Installing and Loading Required Libraries
# # Required Packages
packages = c('quantmod','car','forecast','tseries','FinTS', 'rugarch','utf8','ggplot2')
#
# # Install all Packages with Dependencies
# install.packages(packages, dependencies = TRUE)
#
# # Load all Packages
lapply(packages, require, character.only = TRUE)
[[1]]
[1] TRUE
[[2]]
[1] TRUE
[[3]]
[1] TRUE
[[4]]
[1] TRUE
[[5]]
[1] TRUE
[[6]]
[1] TRUE
[[7]]
[1] TRUE
[[8]]
[1] TRUE
library(writexl)
library(tseries)
library(TSstudio)
library(fBasics)
library(rcompanion)
library(forecast)
library(lmtest)
library(tsDyn)
library(vars)
library(PerformanceAnalytics)
library(vrtest)
library(pracma)
library(rugarch)
library(FinTS)
library(e1071)
library(readxl)
# Fetching Data
symbols <- c("^BSESN","^GSPC","^N225","^HSI","^N100")
getSymbols(Symbols = symbols,
src = 'yahoo',
from = as.Date('2018-01-01'),
to = as.Date('2023-12-31'),
periodicity = 'daily')
Warning: ^BSESN contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
Warning: ^N225 contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
Warning: ^N100 contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
[1] "BSESN" "GSPC" "N225" "HSI" "N100"
The names of the stock exchanges selected
1. **\^BSESN** - SENSEX (BSE Sensex) of the **Bombay Stock Exchange (BSE)-**
The Bombay Stock Exchange (BSE), located in Mumbai, India, is one of the oldest stock exchanges in Asia, founded in 1875. The BSE Sensex, or SENSEX, is its benchmark index, representing 30 of the largest and most actively traded stocks on the exchange, reflecting the overall performance of the Indian stock market.
2. **\^GSPC** - S&P 500 Index of the **New York Stock Exchange (NYSE) and NASDAQ**
The S&P 500 Index tracks the performance of 500 large companies listed on the New York Stock Exchange (NYSE) and NASDAQ. It is widely regarded as one of the best gauges of the U.S. stock market’s health and is a common benchmark for investment performance.
3. **\^N225** - Nikkei 225 Index of the **Tokyo Stock Exchange**
The Nikkei 225 is a stock market index for the Tokyo Stock Exchange (TSE), Japan’s premier stock exchange. It comprises 225 of the largest and most liquid stocks in Japan, serving as a key indicator of the Japanese economy and stock market trends.
4. **\^HSI** - Hang Seng Index of the **Hong Kong Stock Exchange (HKEX)**
The Hang Seng Index (HSI) is the main stock market index of the Hong Kong Stock Exchange (HKEX). It tracks the performance of the largest and most liquid companies listed in Hong Kong, providing insight into the broader economic health of Hong Kong and China.
5. **\^N100** - Euronext 100 Index of the **Euronext Stock Exchange** (covers major European markets)
The Euronext 100 Index represents the largest and most liquid stocks traded on the Euronext Stock Exchange, which operates in several European countries, including France, Belgium, Netherlands, and Portugal. The index includes 100 blue-chip companies, reflecting the performance of major European markets.
Cleaning the Data
# Cleaning Data
BSESN <- na.omit(BSESN$BSESN.Close)
GSPC <- na.omit(GSPC$GSPC.Close)
N225 <- na.omit(N225$N225.Close)
HSI <- na.omit(HSI$HSI.Close)
N100 <- na.omit(N100$N100.Close)
Taking Log Returns of the Chosen Exchanges and Testing Stationarity
Checking Stationarity of the Data:
Used Test: Augmented Dicky Fuller’s Test
H0: The series is not stationary
H1: The series is stationary
# Log Differencing and ADF Test
LRBSESN <- diff(log(BSESN))
LRBSESN <- na.omit(LRBSESN)
adf.test(LRBSESN)
Warning in adf.test(LRBSESN) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: LRBSESN
Dickey-Fuller = -10.311, Lag order = 11, p-value = 0.01
alternative hypothesis: stationary
Results - p-value <0.05 Hence We Reject H0
LRGSPC <- diff(log(GSPC))
LRGSPC <- na.omit(LRGSPC)
adf.test(LRGSPC)
Warning in adf.test(LRGSPC) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: LRGSPC
Dickey-Fuller = -10.808, Lag order = 11, p-value = 0.01
alternative hypothesis: stationary
Results - p-value <0.05 Hence We Reject H0
LRN225 <- diff(log(N225))
LRN225 <- na.omit(LRN225)
adf.test(LRN225)
Warning in adf.test(LRN225) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: LRN225
Dickey-Fuller = -11.387, Lag order = 11, p-value = 0.01
alternative hypothesis: stationary
Results - p-value <0.05 Hence We Reject H0
LRHSI <- diff(log(HSI))
LRHSI <- na.omit(LRHSI)
adf.test(LRHSI)
Warning in adf.test(LRHSI) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: LRHSI
Dickey-Fuller = -11.936, Lag order = 11, p-value = 0.01
alternative hypothesis: stationary
Results - p-value <0.05 Hence We Reject H0
LRN100 <- diff(log(N100))
LRN100 <- na.omit(LRN100)
adf.test(LRN100)
Warning in adf.test(LRN100) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: LRN100
Dickey-Fuller = -10.877, Lag order = 11, p-value = 0.01
alternative hypothesis: stationary
Results - p-value <0.05 Hence We Reject H0
Normality Test for all Series:
Used Test: Jarque Bera Test
H0: The series is normally ditsributed
H1: The series is not normally distributed
jarque.bera.test(LRBSESN)
Jarque Bera Test
data: LRBSESN
X-squared = 31642, df = 2, p-value < 2.2e-16
jarque.bera.test(LRGSPC)
Jarque Bera Test
data: LRGSPC
X-squared = 11983, df = 2, p-value < 2.2e-16
jarque.bera.test(LRN225)
Jarque Bera Test
data: LRN225
X-squared = 669.81, df = 2, p-value < 2.2e-16
jarque.bera.test(LRHSI)
Jarque Bera Test
data: LRHSI
X-squared = 507.86, df = 2, p-value < 2.2e-16
jarque.bera.test(LRN100)
Jarque Bera Test
data: LRN100
X-squared = 14220, df = 2, p-value < 2.2e-16
Explanation:
p-value for all 5 series is less than 0.05
hence we reject the null hypothesis and say that all the series are not normally distributed
Implication: all the 5 return series are risky stock exchanges
Plotting all 5 Stock Exchanges
plotNormalHistogram(LRBSESN)
plotNormalDensity(LRBSESN)
plotNormalHistogram(LRGSPC)
plotNormalDensity(LRGSPC)
plotNormalHistogram(LRN225)
plotNormalDensity(LRN225)
plotNormalHistogram(LRHSI)
plotNormalDensity(LRHSI)
plotNormalHistogram(LRN100)
plotNormalDensity(LRN100)
Obtaining Basic Statistics of Log Returns of Each Stock Exchanges
# Print Basic Stats
basicStats(LRBSESN)
basicStats(LRGSPC)
basicStats(LRN225)
basicStats(LRHSI)
basicStats(LRN100)
ARIMA Modelling of Return Series
1.BSESN
acf(LRBSESN)
pacf(LRBSESN)
#Using Auto arima
arma_pq_LRBSESN = auto.arima(LRBSESN); arma_pq_LRBSESN
Series: LRBSESN
ARIMA(0,0,1) with non-zero mean
Coefficients:
ma1 mean
-0.0403 5e-04
s.e. 0.0255 3e-04
sigma^2 = 0.000137: log likelihood = 4468.7
AIC=-8931.39 AICc=-8931.38 BIC=-8915.5
#Application of ARIMA
model2 = arima(LRBSESN,order = c(0,0,1))
model2
Call:
arima(x = LRBSESN, order = c(0, 0, 1))
Coefficients:
ma1 intercept
-0.0403 5e-04
s.e. 0.0255 3e-04
sigma^2 estimated as 0.0001368: log likelihood = 4468.7, aic = -8931.39
et = residuals(model2)
et
Time Series:
Start = 1
End = 1475
Frequency = 1
[1] -5.287149e-04 -1.094593e-03 4.643525e-03 5.080465e-03 5.497748e-03 2.334836e-03 -7.145648e-04 1.499500e-03 2.118991e-03 6.803843e-03 -2.322470e-03
[12] 8.289655e-03 4.893462e-03 6.783782e-03 7.792063e-03 9.306495e-03 4.592551e-04 -3.576005e-03 5.778377e-03 -7.182737e-03 -2.712641e-03 -2.247936e-03
[23] -2.427464e-02 -1.036010e-02 -1.721056e-02 -4.524536e-03 8.951891e-03 -1.206327e-02 7.628526e-03 -4.429723e-03 3.441676e-03 -8.770656e-03 -7.834094e-03
[34] -2.936669e-03 3.549798e-03 -1.121307e-03 8.935226e-03 8.698119e-03 -3.053093e-03 -5.375754e-03 -4.749837e-03 -9.561151e-03 -1.371104e-02 -9.630857e-03
[45] 8.692513e-03 -1.497682e-03 1.759729e-02 -1.610822e-03 -1.201297e-03 -5.012034e-03 -1.595846e-02 -8.808935e-03 1.364786e-03 3.756561e-03 -4.291614e-03
[56] -1.317895e-02 1.326640e-02 3.279813e-03 -6.602817e-03 7.877313e-03 3.262738e-03 -1.097416e-02 1.638890e-02 1.042860e-03 4.320574e-03 2.369883e-03
[67] 1.355755e-03 4.263121e-03 2.337158e-03 2.872399e-03 2.210243e-03 -2.270065e-03 2.174879e-03 -7.673369e-04 4.764152e-04 4.307658e-03 -3.679610e-03
[78] 5.472575e-03 7.056056e-03 5.206807e-03 1.517202e-04 -2.594015e-03 -5.982385e-03 7.594306e-03 2.343656e-05 2.407637e-03 -2.489063e-03 7.565693e-03
[89] 3.785692e-04 -8.586526e-04 -4.949642e-03 -7.483782e-03 -9.411330e-03 -7.578373e-03 1.938316e-04 -9.386527e-03 8.329437e-03 7.343969e-03 6.646777e-03
[100] -6.415279e-03 -2.007869e-03 1.125929e-02 -2.757725e-03 -6.758291e-03 -3.895784e-03 7.195447e-03 7.821308e-03 -7.470921e-04 5.774004e-04 5.382762e-03
[111] 1.007956e-03 -4.380530e-03 -6.433624e-05 -2.593408e-03 -8.003197e-03 6.520776e-03 -3.490698e-03 6.577700e-03 -6.411995e-03 -2.180433e-04 -8.243525e-03
[122] -5.955787e-03 1.019740e-02 -4.604673e-03 2.532772e-03 7.100199e-03 -2.218305e-03 1.735026e-03 7.289514e-03 8.227966e-03 5.423577e-04 7.266103e-03
[133] -4.076366e-04 -6.510913e-03 4.609737e-03 -4.349166e-03 -1.300678e-03 3.417695e-03 5.693584e-03 2.610832e-03 4.896663e-04 2.928781e-03 9.081355e-03
[144] 4.061757e-03 2.636313e-03 -2.670187e-03 -1.016780e-02 9.541463e-03 3.477109e-03 -1.067097e-03 5.312570e-03 3.303758e-03 -4.470029e-03 -6.636198e-03
[155] 4.704414e-03 -5.316051e-03 6.791805e-03 8.440122e-03 8.055371e-06 8.171293e-04 -2.700428e-03 1.087328e-02 5.143403e-03 -4.783228e-03 -1.555465e-03
[166] -1.741919e-03 -9.227351e-03 -4.929649e-03 -4.378771e-03 5.196636e-03 3.531376e-03 -1.262886e-02 -1.453757e-02 7.014547e-03 9.599992e-03 -1.347804e-02
[177] -8.932936e-03 -5.428927e-03 -8.294396e-03 -1.552041e-02 8.373835e-03 -3.177402e-03 -6.628913e-03 -3.456499e-03 7.565702e-03 -1.539646e-02 -2.380693e-02
[188] -2.425564e-02 1.337472e-03 -5.547381e-03 1.262495e-02 -2.210488e-02 1.990766e-02 4.066516e-03 8.142311e-03 -1.113603e-02 -1.439265e-02 -6.390180e-03
[199] -9.219929e-03 4.615686e-03 -1.048397e-02 -1.110360e-02 2.034196e-02 -4.883053e-03 1.541357e-02 -1.867254e-04 1.617314e-02 -1.599342e-03 5.929388e-04
[210] 6.508236e-03 -2.500701e-03 -1.049272e-02 8.539985e-03 -2.419127e-04 2.843357e-03 5.160553e-03 8.613855e-03 -8.599282e-03 -8.635054e-03 -7.097266e-03
[221] 9.807607e-03 4.369312e-03 5.383819e-03 1.231816e-02 6.416655e-04 8.005440e-04 -3.430747e-03 -7.592715e-03 -1.689692e-02 8.979422e-03 -2.035768e-02
[232] 4.093886e-03 1.738831e-02 4.385075e-03 5.879737e-04 8.013191e-03 1.928937e-03 3.331964e-03 -1.824815e-03 -1.969826e-02 -8.944984e-03 4.181109e-03
[243] 4.057438e-03 7.145189e-03 -4.595517e-04 -5.447310e-03 -1.131628e-02 4.124184e-03 3.985955e-03 3.286855e-03 6.044290e-03 -3.214068e-03 -3.324816e-03
[254] -4.998006e-03 1.216371e-02 5.668560e-05 9.399168e-04 -1.323987e-04 4.752370e-03 -4.002136e-03 -9.942864e-03 1.481237e-03 -5.150738e-03 -1.101320e-02
[265] -2.760337e-03 -6.609890e-04 1.798281e-02 6.059924e-03 2.831477e-03 5.302169e-04 9.247506e-03 -2.542716e-04 -1.207631e-02 -5.153674e-03 -7.377404e-03
[276] -8.514276e-03 -2.734400e-03 -9.333873e-03 -5.007188e-03 1.063685e-02 3.879641e-03 -1.107273e-03 8.926774e-03 -6.795412e-03 -2.688263e-03 -1.681535e-03
[287] 4.877449e-03 1.012864e-02 5.190592e-03 2.129410e-03 -1.900186e-03 9.789852e-03 1.279193e-02 5.752050e-03 -2.110395e-04 6.587741e-03 1.609525e-03
[298] 6.570904e-03 3.566005e-04 -6.304059e-03 -1.013242e-02 1.024219e-02 -2.735094e-03 1.014331e-02 8.319639e-03 4.562586e-03 -4.938141e-03 -5.674848e-03
[309] 3.834939e-03 -4.529772e-03 5.451481e-03 -9.424383e-03 -3.330476e-04 3.610165e-03 3.202861e-03 9.074416e-03 -3.601600e-03 -1.338985e-02 -3.134007e-03
[320] 1.197980e-02 -8.358270e-03 7.798526e-03 -1.116842e-03 -1.844623e-03 -1.055166e-03 -9.915311e-03 -9.335600e-03 -1.370870e-02 -7.177616e-03 -3.360935e-03
[331] -1.063401e-02 5.177549e-03 -5.778271e-03 6.731024e-03 1.402265e-02 3.685125e-02 -8.807472e-03 2.727172e-03 -8.074678e-03 1.509295e-02 6.376683e-03
[342] 1.414995e-03 -6.708189e-03 7.532377e-03 -3.172392e-03 1.319645e-02 -4.565194e-03 -1.461155e-02 1.074603e-03 3.775941e-03 3.799694e-03 -5.220777e-03
[353] -1.113626e-03 -7.865469e-03 -1.336226e-02 1.140575e-03 1.230291e-03 1.195689e-02 -1.036729e-02 -2.758821e-03 7.316923e-03 3.756759e-03 -5.065776e-04
[364] -5.391203e-03 6.649477e-03 3.022918e-03 1.787366e-04 1.218162e-03 -1.040430e-02 -2.120234e-02 -1.103894e-03 -5.056154e-03 6.158666e-03 -2.506999e-03
[375] 3.518679e-03 5.633298e-03 1.871838e-03 -8.586005e-03 -1.537367e-02 -9.144627e-03 -2.156186e-03 -4.164489e-03 -1.122911e-03 8.086132e-04 -5.680513e-03
[386] -8.445132e-03 1.385700e-03 -1.288333e-02 1.661439e-03 -1.178332e-02 6.530445e-03 -8.025922e-03 1.637076e-02 6.940859e-03 -1.697153e-02 8.317771e-03
[397] 8.595446e-04 9.154505e-04 -2.471040e-03 -7.810013e-03 -1.680713e-02 5.046464e-03 2.106431e-02 4.250505e-03 -5.388729e-03 -1.100841e-02 6.134820e-03
[408] -2.110530e-02 3.051585e-03 -2.581186e-03 8.545205e-03 4.245625e-03 3.025737e-03 -4.871211e-03 6.826001e-03 -7.264007e-03 -1.825824e-02 1.016789e-03
[419] -1.342266e-02 5.080366e-02 2.942792e-02 8.522915e-04 -1.344534e-02 9.157935e-03 -4.442593e-03 -4.700395e-03 -1.010787e-02 -6.118307e-03 -1.220386e-02
[430] -4.764651e-03 1.635813e-02 -7.680235e-03 5.666949e-03 2.002985e-03 7.168162e-03 2.183637e-03 1.124276e-02 6.225750e-03 -8.813212e-03 1.565257e-03
[441] -1.436243e-03 3.923311e-04 1.911847e-02 5.764050e-03 1.642570e-03 4.476651e-04 2.906705e-03 -1.731729e-03 4.905070e-03 4.218078e-03 -8.498486e-03
[452] -3.246891e-04 -6.220469e-03 3.474005e-03 1.366479e-03 -2.257767e-03 3.988779e-03 4.131604e-03 -2.231158e-03 -5.936326e-03 1.228836e-02 -1.682510e-03
[463] 4.288123e-03 2.325344e-03 -8.632696e-03 -6.573713e-04 -3.651792e-03 3.627431e-03 -2.100807e-03 -8.834318e-03 1.743676e-04 -6.640712e-03 3.500225e-03
[474] 3.802873e-03 1.012984e-02 -1.839354e-03 9.459882e-03 4.845092e-03 2.452215e-03 -2.331816e-04 -1.457290e-03 -4.938979e-03 -7.914848e-03 9.110654e-03
[485] -5.601586e-04 -7.885570e-03 8.166353e-03 -4.085907e-03 -1.986583e-02 3.414848e-03 -1.643728e-03 1.484696e-02 3.632017e-03 5.861507e-03 1.939109e-03
[496] -2.342917e-03 8.187310e-04 -1.762268e-04 -1.050007e-02 -5.888570e-03 -5.808430e-03 5.821429e-03 5.184673e-03 -1.137475e-02 -5.557730e-03 4.903776e-03
[507] -7.255039e-03 -5.469759e-03 -2.185795e-02 2.134468e-02 8.968720e-03 3.809472e-03 -4.343920e-03 -4.640637e-03 5.053453e-03 8.138953e-03 -2.742989e-03
[518] -5.510499e-03 -5.645843e-03 -4.678929e-03 9.723492e-03 -3.829581e-03 -2.046247e-02 -3.373174e-03 -1.043577e-02 -4.533939e-03 -3.781884e-02 -6.047894e-03
[529] 1.173881e-02 -5.603692e-03 8.498627e-04 -2.399296e-02 -5.453616e-02 -9.600785e-04 -8.586933e-02 3.566471e-02 -8.198623e-02 -2.999168e-02 -5.925297e-02
[540] -2.324115e-02 5.449563e-02 -1.393374e-01 2.018948e-02 6.776669e-02 5.047718e-02 -2.871906e-03 -4.785390e-02 3.307179e-02 -4.086910e-02 -2.630809e-02
[551] 8.437325e-02 -2.895528e-03 4.083520e-02 -1.405566e-02 -1.124000e-02 6.339651e-03 3.145545e-02 2.626928e-03 -3.288487e-02 2.211838e-02 1.566761e-02
[562] -1.684431e-02 1.199429e-02 1.160184e-02 1.863569e-02 3.026498e-02 -6.051566e-02 -1.124203e-02 6.389029e-03 -7.935957e-03 5.484650e-03 -2.872097e-03
[573] -6.671846e-03 1.933382e-02 -2.779741e-02 -2.442917e-03 -3.558500e-02 3.604359e-03 2.003407e-02 3.993768e-03 -8.804801e-03 -2.934802e-03 3.138551e-02
[584] 1.941173e-02 7.184249e-03 2.653575e-02 1.610676e-02 8.495162e-03 -3.956970e-03 8.306470e-03 2.247509e-03 -1.253917e-02 7.494834e-03 -2.112313e-02
[595] 5.839701e-03 -1.675781e-02 1.007480e-02 -3.008454e-03 2.004327e-02 1.548516e-02 5.266374e-03 1.445729e-02 -1.590589e-02 -1.926426e-03 8.810787e-03
[606] -6.141397e-03 -2.070576e-03 1.358235e-02 1.208018e-02 4.917814e-03 1.253328e-02 5.108527e-03 -9.774549e-03 1.027825e-02 -4.010754e-03 2.035359e-03
[617] -1.860077e-02 -7.435837e-04 1.103438e-02 1.485573e-02 1.079975e-02 1.349295e-02 -1.522947e-03 6.500489e-03 -5.563176e-04 -5.642527e-03 1.386608e-02
[628] -1.097514e-02 -9.796514e-03 -4.338348e-03 -1.859253e-02 1.879170e-02 -4.103774e-04 9.037530e-03 2.468403e-04 3.208255e-03 5.488295e-03 -1.267482e-03
[639] -2.108276e-03 -1.197027e-02 3.571800e-03 1.210109e-02 2.214416e-03 -1.069170e-02 4.646741e-03 9.107735e-03 1.006110e-03 5.430593e-03 7.155937e-04
[650] 8.519938e-03 -2.165940e-02 5.642968e-03 4.462864e-03 -2.770770e-03 -1.701391e-02 3.644469e-04 -1.851345e-03 -5.067621e-03 1.606371e-02 4.985416e-04
[661] -3.018023e-03 6.760164e-03 6.356402e-03 -8.510903e-03 -4.301859e-03 -2.180424e-02 -9.313395e-03 -2.631265e-03 -3.066308e-02 2.083815e-02 1.605964e-02
[672] -8.939057e-05 1.972743e-03 1.595595e-02 7.251535e-03 1.507704e-02 7.754337e-03 7.384843e-03 7.883075e-03 1.881909e-03 3.419586e-04 3.655942e-03
[683] -2.685402e-02 4.791138e-03 1.083607e-02 2.706955e-03 3.605005e-03 -4.032081e-03 2.449591e-03 -1.377746e-02 8.267632e-03 -1.509019e-02 -5.455413e-03
[694] -4.156147e-03 2.934020e-03 1.218945e-02 8.755278e-03 1.750678e-02 1.347606e-02 1.670178e-02 1.600031e-02 7.405371e-03 -5.655887e-03 1.234673e-03
[705] 1.119959e-02 5.095377e-03 -1.352659e-02 5.394202e-03 4.134098e-03 9.716664e-03 -1.585454e-02 8.647016e-03 -2.655330e-03 1.076797e-02 -9.189758e-04
[716] -2.243338e-04 9.439368e-03 7.542675e-03 3.777466e-03 1.043194e-02 -3.214632e-03 2.378530e-03 2.925867e-03 -1.869419e-04 8.157273e-03 4.599767e-03
[727] 1.169760e-03 -3.088091e-02 8.130916e-03 9.277054e-03 1.119220e-02 7.997606e-03 5.268842e-03 2.489889e-03 -3.074230e-04 1.933741e-03 5.973062e-03
[738] 5.128368e-03 -5.767611e-03 -2.424355e-03 1.361625e-02 9.963358e-03 4.903220e-03 -8.179787e-04 1.306274e-03 -1.160589e-02 -1.062167e-02 1.608526e-02
[749] 8.074064e-03 -3.556362e-03 -1.580944e-02 -1.207344e-02 -2.058561e-02 -1.270462e-02 -1.366261e-02 4.773658e-02 2.574088e-02 9.677743e-03 6.984006e-03
[760] 2.082193e-03 1.166057e-02 -4.286584e-04 -9.155940e-04 3.768286e-03 -1.149470e-04 1.124237e-02 -1.020275e-03 -8.268988e-03 -8.207590e-03 -9.355436e-03
[771] -2.365694e-02 -1.324913e-03 1.992902e-02 5.348099e-03 -3.903662e-02 1.306968e-02 8.939622e-03 2.240850e-02 -1.131570e-02 -9.676677e-03 -1.954085e-04
[782] 1.099682e-02 4.894334e-03 -9.868486e-03 -8.759018e-03 -1.485107e-03 -1.180283e-02 -1.280824e-02 1.192389e-02 -1.779948e-03 5.026626e-03 -1.787026e-02
[793] -1.639928e-02 1.049019e-02 2.266486e-02 -1.219530e-02 9.456081e-03 -1.768681e-02 -3.715674e-04 8.783701e-03 1.538083e-03 -3.571234e-03 -3.570590e-02
[804] 1.175069e-02 5.292431e-03 2.791995e-04 -1.874319e-02 -6.363284e-03 7.056295e-03 -4.445300e-03 9.861874e-03 1.134103e-02 1.594795e-02 7.728218e-04
[815] -2.044566e-02 -2.647626e-03 -1.021196e-02 7.823383e-03 5.376912e-03 1.092870e-02 -6.978860e-03 -1.042272e-02 -7.736849e-05 1.673724e-02 1.243920e-02
[826] -5.821936e-03 -7.540985e-03 1.867411e-02 2.439455e-03 -7.001453e-04 6.933169e-03 1.677696e-03 5.553775e-03 9.665718e-03 -1.747785e-04 -2.167432e-03
[837] 6.756655e-03 -2.780232e-03 3.748786e-03 -1.375954e-03 -6.978478e-03 6.088797e-03 3.057500e-03 1.070342e-03 3.734826e-03 -5.514058e-03 -4.145344e-03
[848] -2.780630e-04 3.858668e-03 -8.829667e-05 -5.907154e-03 6.731300e-03 4.036459e-03 -3.938142e-03 -4.205228e-03 -1.958889e-03 -3.725414e-03 2.504450e-03
[859] 7.090191e-03 -5.851317e-04 3.117127e-03 -9.588310e-03 -4.383293e-03 -9.489640e-04 6.999521e-03 2.309357e-03 4.383021e-03 -6.917743e-04 -1.164384e-02
[870] -7.759413e-03 1.133452e-02 2.561293e-03 -2.746119e-03 -5.813682e-03 -3.320682e-03 3.335695e-03 -1.639023e-03 6.313344e-03 1.608716e-02 1.023390e-02
[881] 2.158465e-03 -4.383283e-03 1.611535e-03 2.336765e-03 -9.473702e-04 5.263217e-03 1.045728e-02 2.523793e-03 3.352449e-03 -3.301586e-03 -6.058119e-03
[892] 3.326073e-03 6.850453e-03 -5.027869e-04 -4.475353e-04 2.601232e-03 1.312911e-02 1.159432e-02 -3.776184e-03 8.263305e-03 4.601747e-03 2.538706e-03
[903] -7.114884e-04 -1.044838e-03 3.836925e-04 -2.685129e-03 5.681110e-04 7.648911e-03 6.885605e-03 -2.357793e-03 -9.544703e-03 7.855967e-03 -1.520118e-03
[914] 1.555118e-02 2.831575e-03 8.898593e-05 -7.363636e-03 -5.082847e-03 -5.560158e-03 -6.859185e-03 8.250627e-03 7.303206e-03 -9.556007e-03 7.312960e-03
[925] 6.147634e-03 1.009517e-03 1.992774e-03 7.047608e-03 9.092108e-03 7.320982e-03 -1.022239e-03 -7.973447e-03 -6.343299e-03 -2.443807e-03 1.775110e-03
[936] 5.822656e-03 -3.658897e-03 -1.979329e-02 -1.267519e-02 1.289826e-02 -1.816087e-03 -4.880579e-03 4.223673e-03 7.581405e-03 -2.063588e-03 -1.932876e-03
[947] -7.795035e-03 1.189060e-02 4.916440e-04 -7.043775e-03 -6.018051e-03 -6.980805e-03 -2.061193e-02 2.043527e-03 -5.959344e-03 6.998740e-03 -2.936189e-02
[958] 9.859134e-04 -3.898683e-03 1.013309e-02 1.326468e-02 -1.314947e-02 -1.763483e-02 1.427640e-02 1.753579e-02 2.872483e-03 -7.469474e-04 -9.142251e-03
[969] -3.740813e-03 -6.343438e-03 1.185232e-03 -1.594687e-02 -2.224584e-02 7.453297e-03 1.058555e-02 6.646627e-03 -3.584557e-03 4.508017e-03 7.943891e-03
[980] -1.767627e-03 -7.964066e-04 7.372393e-03 1.561056e-02 1.141644e-02 6.061368e-03 -1.064096e-02 1.449936e-03 1.038080e-02 3.560203e-03 8.385599e-03
[991] 1.216340e-03 -6.661046e-04 8.602109e-04 -9.558177e-03 -1.175649e-02 -1.159685e-02 -8.195860e-03 -2.737487e-02 4.739824e-03 -1.041999e-02
[ reached getOption("max.print") -- omitted 475 entries ]
#Checking of significance of ARMA
coeftest(model2)
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
ma1 -0.04027260 0.02549300 -1.5798 0.11416
intercept 0.00051470 0.00029342 1.7541 0.07941 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#point forecast is called out of sample forecast
autoplot(forecast(model2, h=500))
Explanation:
Auto ARIMA: gave order of ARIMA (0,0,1)
i.e. no autoregressive (AR) terms, no differencing (D) terms, and one moving average (MA) term.
Log likelihood: 4468.7 This is a measure of the model’s goodness of fit. A higher log likelihood indicates a better fit.
AIC: -8931.39 The Akaike Information Criterion (AIC) is a measure of model complexity and fit. A lower AIC indicates a better model.
sigma^2: 0.000137 This is the estimated variance of the residuals, representing the model’s ability to fit the data. A smaller value suggests a better fit.
Implication: The ARIMA(0,0,1) model provides a parsimonious representation of the LRNSEI time series. The model suggests that the current value of the series is influenced by the previous period’s error.
The significance test indicate that the MA1 coefficient in the ARIMA(0,0,1) model is not statistically significant. The intercept coefficient is close to being statistically significant, but more evidence is needed to confirm its significance.
2.GSPC
acf(LRGSPC)
pacf(LRGSPC)
#Using Auto arima
arma_pq_LRGSPC = auto.arima(LRGSPC); arma_pq_LRGSPC
Series: LRGSPC
ARIMA(4,0,4) with zero mean
Coefficients:
ar1 ar2 ar3 ar4 ma1 ma2 ma3 ma4
-0.2431 0.7515 -0.3713 -0.8419 0.1408 -0.7099 0.4569 0.6795
s.e. 0.0391 0.0390 0.0352 0.0371 0.0510 0.0483 0.0442 0.0483
sigma^2 = 0.0001553: log likelihood = 4476.69
AIC=-8935.38 AICc=-8935.26 BIC=-8887.52
#Application of ARIMA
model2 = arima(LRGSPC,order = c(4,0,4))
model2
Call:
arima(x = LRGSPC, order = c(4, 0, 4))
Coefficients:
ar1 ar2 ar3 ar4 ma1 ma2 ma3 ma4 intercept
-0.2399 0.7515 -0.3747 -0.8428 0.1366 -0.7098 0.4611 0.6797 4e-04
s.e. 0.0400 0.0385 0.0350 0.0368 0.0521 0.0478 0.0442 0.0483 3e-04
sigma^2 estimated as 0.0001543: log likelihood = 4477.52, aic = -8935.05
et = residuals(model2)
et
Time Series:
Start = 1
End = 1508
Frequency = 1
[1] 5.707720e-03 4.474868e-03 6.440520e-03 1.912147e-03 1.054237e-03 -1.431505e-03 7.258731e-03 6.769181e-03 -2.868039e-03 7.186766e-03 3.139342e-05
[12] 2.530853e-03 8.455008e-03 3.202811e-03 -2.061236e-03 1.854117e-03 1.033949e-02 -4.733918e-03 -1.374823e-02 -2.494570e-04 -1.167802e-04 -2.300643e-02
[23] -4.359253e-02 1.278865e-02 -7.227884e-04 -4.197355e-02 8.985966e-03 1.876801e-02 -8.408609e-04 1.402986e-02 1.298726e-02 1.039657e-03 -5.038338e-03
[34] -6.191760e-03 1.636426e-03 1.473866e-02 1.253113e-02 -1.465180e-02 -1.385204e-02 -1.361624e-02 4.908355e-03 1.265360e-02 3.823551e-03 -2.696318e-03
[45] 4.009981e-03 1.542701e-02 2.870237e-04 -8.117837e-03 -5.260534e-03 3.814538e-04 1.478532e-03 -1.347109e-02 -2.708782e-03 -1.534526e-03 -2.811361e-02
[56] -2.489394e-02 2.677148e-02 -1.415586e-02 -5.775201e-03 1.293320e-02 -1.924192e-02 4.511956e-03 1.719163e-02 3.526988e-03 -2.142545e-02 1.549976e-03
[67] 1.692421e-02 -9.814699e-04 2.345743e-03 1.753867e-03 2.845362e-03 1.292431e-02 3.568157e-04 -6.941345e-03 -7.125672e-03 -1.979683e-03 -1.093711e-02
[78] -2.039250e-03 1.136876e-02 -3.091581e-05 -1.061170e-02 2.105251e-03 -7.452651e-03 -1.261776e-03 1.213169e-02 6.447311e-03 -3.206747e-03 9.484166e-03
[89] 8.427695e-03 1.548156e-03 6.068496e-04 -6.277624e-03 4.446262e-03 7.234967e-06 -2.718776e-03 5.055548e-03 -2.587446e-03 -2.004629e-04 -1.283866e-03
[100] -3.108915e-03 -1.138378e-02 1.300844e-02 -5.919715e-03 1.007012e-02 2.691984e-03 1.737369e-03 3.979368e-03 3.535451e-03 -3.613868e-04 5.044379e-03
[111] 6.527152e-04 -3.237778e-03 1.406429e-03 -2.702257e-03 -2.495704e-03 -6.918300e-03 2.864279e-03 -7.536536e-03 3.051006e-03 -1.437193e-02 1.560996e-03
[122] -9.735825e-03 5.170526e-03 -1.300550e-03 3.868809e-03 -7.628035e-03 1.079933e-02 7.587837e-03 1.195860e-02 1.581950e-03 -5.698056e-03 5.394895e-03
[133] 2.939878e-03 -2.722868e-03 3.375912e-03 3.570297e-03 -5.374985e-03 1.983132e-05 3.359034e-04 5.636321e-03 7.602988e-03 -2.406134e-03 -8.529023e-03
[144] -6.174529e-03 5.023158e-03 -7.036354e-04 4.957045e-03 3.620414e-03 3.960162e-03 7.303845e-04 6.691002e-04 -2.897645e-03 -6.053894e-03 -5.040274e-03
[155] 6.640502e-03 -7.342768e-03 5.265191e-03 3.740043e-03 1.258457e-03 1.084936e-03 9.666217e-04 -2.761975e-03 7.957530e-03 7.116152e-03 1.140508e-03
[166] 3.359470e-03 -4.188084e-03 -1.709977e-03 -1.634210e-03 -2.162023e-03 -4.650344e-03 -1.116016e-03 -1.505225e-05 4.298691e-03 -1.649952e-03 4.793003e-03
[177] -1.708601e-04 -5.575453e-03 4.993061e-03 2.817415e-03 7.431116e-03 -3.053739e-04 -4.514974e-03 -3.474568e-03 -2.799469e-03 8.844048e-04 1.595613e-03
[188] 2.645362e-03 3.630077e-04 5.801248e-05 -9.073879e-03 -6.457541e-03 -2.102129e-03 -6.157565e-04 -3.535386e-02 -2.344826e-02 1.254498e-02 -2.913489e-03
[199] 1.680044e-02 2.217432e-03 -1.707283e-02 -3.172243e-03 -4.420339e-04 -8.401898e-03 -2.853060e-02 1.281899e-02 -1.366475e-02 -1.185638e-02 1.235668e-02
[210] 1.531224e-02 5.007243e-03 2.568507e-04 7.356833e-04 1.209616e-02 1.947066e-02 -6.419972e-04 -1.138080e-02 -2.384717e-02 -9.676005e-04 -1.033159e-02
[221] 1.340067e-02 -1.685921e-05 -1.397061e-02 -2.436723e-02 4.638434e-03 -8.617446e-03 1.510417e-02 3.200562e-03 2.247316e-02 -1.495892e-03 8.526609e-03
[232] 1.032677e-02 -2.866666e-02 -8.696363e-03 -1.866208e-02 -3.979372e-03 -3.485495e-04 4.968626e-03 -4.908587e-03 -1.560868e-02 -2.778784e-02 4.972849e-03
[243] -1.762085e-02 -1.507365e-02 -2.511117e-02 -2.943805e-02 4.289212e-02 1.402942e-02 -4.870162e-03 6.939945e-03 7.546433e-03 -2.843553e-02 3.762468e-02
[254] 7.363153e-03 1.067254e-02 -2.213687e-03 7.574139e-03 -5.808214e-03 2.643329e-04 7.858096e-03 8.486693e-03 5.586314e-03 1.361400e-02 -1.477029e-02
[265] -3.662303e-03 3.198659e-03 6.702565e-03 -5.632257e-03 -1.429224e-03 1.561727e-02 1.178135e-02 -2.505235e-03 6.923647e-03 2.440547e-03 -1.536817e-03
[276] -1.036617e-02 1.397970e-03 1.919351e-03 1.298390e-02 3.239340e-03 -4.422664e-03 8.281555e-03 2.782948e-03 2.482800e-04 -1.927262e-03 6.774510e-03
[287] 2.405733e-03 -5.662687e-04 -2.911328e-03 -2.878412e-03 3.654289e-03 -2.439766e-03 -3.155423e-03 -5.375296e-03 -8.049959e-03 -3.117342e-03 1.546585e-02
[298] 1.871172e-03 6.007134e-03 -2.911397e-03 5.580023e-03 3.113294e-03 2.684968e-03 -4.020203e-03 1.234682e-02 -1.981848e-02 -3.902838e-03 5.774852e-03
[309] -3.843752e-03 -1.169435e-04 9.680557e-03 1.050763e-02 2.614646e-03 1.117567e-03 2.187449e-03 4.717952e-03 -6.148132e-04 -5.698435e-03 7.518769e-04
[320] 2.022827e-03 5.251256e-03 6.984025e-04 -1.047823e-04 -3.107938e-03 1.782331e-03 -7.561894e-04 9.667064e-03 -3.377315e-03 1.798176e-05 3.401151e-03
[331] 2.958935e-03 -6.357913e-04 -6.700963e-03 -4.160235e-03 9.452211e-03 -3.965685e-03 -1.899250e-02 -2.823648e-03 -2.828647e-03 3.373559e-03 -2.479297e-02
[342] 5.209154e-03 6.350087e-03 9.557394e-03 -8.686851e-03 -5.060920e-03 4.620294e-03 2.204269e-03 -1.591732e-02 2.472806e-03 -9.444295e-03 -8.599842e-03
[353] 6.678511e-04 -1.374290e-02 -5.123291e-03 2.130499e-02 1.078118e-02 4.612509e-03 1.145506e-02 5.090546e-03 -6.000353e-04 -1.912140e-03 3.466069e-03
[364] -9.675237e-04 -3.466700e-04 9.340189e-03 3.369640e-03 8.211505e-03 -2.715848e-04 -2.531324e-03 -9.531000e-03 -1.340795e-03 3.106992e-03 6.646044e-03
[375] 5.402125e-03 3.649972e-03 5.486637e-03 -2.770997e-04 -5.551262e-03 1.668850e-03 5.792187e-03 1.594385e-03 4.409714e-03 -1.622584e-03 -4.144831e-03
[386] -8.195656e-03 3.803271e-03 -5.507437e-03 2.729739e-03 6.869276e-03 5.195775e-03 -7.435326e-03 6.557282e-03 -2.262651e-03 -2.317479e-03 -1.193782e-02
[397] -8.197514e-03 -8.972317e-03 -2.962284e-02 7.492745e-03 3.246691e-03 1.555770e-02 -7.166144e-03 -1.197757e-02 1.117278e-02 -2.157612e-02 -5.565144e-03
[408] 2.023111e-02 1.013535e-02 -1.038840e-02 7.131964e-03 -3.399321e-03 -2.263234e-02 5.187734e-03 5.203919e-03 2.345468e-03 1.424612e-02 -8.021781e-05
[419] -1.163873e-02 1.159097e-02 1.144862e-02 5.298815e-03 -2.054118e-03 3.790242e-03 5.743770e-03 3.702962e-03 -2.827978e-03 -5.355142e-03 1.989042e-03
[430] -4.545553e-04 1.601444e-03 -5.300323e-03 1.089233e-03 -9.472796e-03 5.144056e-03 -3.747027e-03 -6.626960e-03 2.432688e-03 -1.030385e-02 -2.075912e-02
[441] 8.532659e-03 1.577403e-02 -4.395625e-03 -1.828494e-02 6.318085e-03 7.391206e-03 1.019684e-02 -6.762844e-04 1.041888e-02 -1.385630e-03 3.807558e-03
[452] -5.707938e-03 7.829366e-03 -6.210084e-03 3.501341e-03 -7.138928e-04 6.303116e-03 3.749585e-03 1.833245e-03 1.354661e-03 -1.649779e-03 7.979109e-03
[463] 4.021649e-03 -1.609303e-03 -1.433206e-03 4.409873e-03 1.102620e-03 -4.304367e-05 -1.279471e-04 1.658303e-03 -4.364741e-04 6.946444e-03 7.200612e-04
[474] -2.054536e-03 -3.461424e-03 -2.072818e-03 2.465197e-03 7.824482e-03 1.938439e-03 3.471090e-03 -5.057282e-03 -9.337057e-03 -8.183944e-03 7.045956e-03
[485] 1.711027e-03 9.162793e-03 -3.727517e-03 -2.023690e-03 1.293697e-03 9.773371e-03 -7.330344e-04 8.061970e-03 -1.222648e-05 2.968255e-04 2.914332e-03
[496] 6.150043e-03 -7.149831e-04 -1.151213e-04 4.065946e-03 7.604074e-04 -6.296622e-03 2.239405e-03 9.198829e-03 -7.359097e-03 1.914799e-03 -2.921373e-03
[507] 4.201020e-03 6.097554e-03 -1.468841e-03 4.684633e-03 9.170153e-04 -1.091738e-04 8.977430e-03 4.188305e-03 -3.982713e-03 2.625645e-04 1.336326e-04
[518] -8.256945e-03 -1.785372e-02 9.392576e-03 1.242448e-04 1.661727e-03 -1.905092e-02 5.395166e-03 1.471810e-02 1.409929e-02 8.260690e-04 -2.562268e-03
[529] 4.018504e-03 5.206937e-03 4.249961e-03 -8.195401e-04 7.486456e-04 -4.244627e-03 5.385649e-03 -5.361941e-03 -9.199935e-03 -3.724589e-02 -3.172846e-02
[540] -7.588930e-03 -4.335368e-02 -1.667213e-02 4.556581e-02 -2.516200e-02 3.180352e-02 -2.579813e-02 -2.320645e-02 -7.908568e-02 4.805645e-02 -4.979797e-02
[551] -9.978615e-02 6.320211e-02 -9.919201e-02 1.882121e-02 -2.921307e-02 -5.331425e-03 -5.086975e-02 -1.156892e-02 5.991370e-02 5.271767e-02 2.200256e-02
[562] -5.800133e-03 9.862792e-03 -2.215034e-03 -4.122872e-02 1.015901e-02 8.845326e-03 4.270324e-02 1.971991e-02 1.132959e-02 2.234407e-02 -8.963196e-03
[573] 2.588165e-02 -2.349726e-03 -6.862274e-03 4.008493e-02 -2.652310e-02 -3.575712e-02 1.514881e-02 7.241313e-04 1.430535e-02 1.580704e-02 3.488436e-03
[584] 2.173817e-02 -3.561488e-05 -3.761522e-02 1.846483e-03 7.693470e-03 -9.508733e-03 1.143567e-02 1.792936e-02 4.693338e-03 -2.223507e-02 -1.708972e-02
[595] 8.506300e-03 5.385224e-03 2.694210e-02 -9.400969e-03 1.330611e-02 -6.212698e-03 5.931480e-03 1.034195e-02 2.285157e-02 -8.386997e-03 7.716987e-03
[606] -2.924704e-03 1.065141e-02 1.069606e-02 7.435035e-04 2.502317e-02 1.698067e-02 -7.052795e-03 -9.016674e-03 -5.911116e-02 2.300335e-03 1.448713e-02
[617] 1.616279e-02 -5.103636e-03 2.935456e-03 -1.076232e-02 1.342734e-02 -7.072387e-04 -1.969775e-02 1.708496e-03 -1.881636e-02 7.015852e-03 1.687368e-02
[628] 7.267570e-03 -1.065710e-03 2.320996e-02 -1.512598e-02 1.271773e-02 -8.984902e-03 1.320945e-02 -1.330674e-02 1.373773e-02 6.490001e-03 -6.201008e-04
[639] -9.441874e-04 1.294627e-02 6.840884e-04 7.344461e-03 -1.323436e-02 -8.541640e-03 6.034749e-03 -6.294683e-03 9.919822e-03 -1.826749e-03 6.683854e-03
[650] 7.821235e-03 5.715856e-03 3.883634e-03 9.092326e-03 -2.343439e-03 3.972591e-03 -9.696943e-03 1.396229e-02 -8.129750e-04 -6.471242e-04 1.693988e-03
[661] 3.577349e-03 -6.763531e-03 3.715741e-03 1.900996e-03 1.115652e-02 2.936206e-03 1.091513e-02 1.563111e-03 7.211360e-03 -2.562651e-03 7.790162e-03
[672] 1.471008e-02 -3.374232e-02 -1.468716e-02 -2.586970e-02 1.680708e-02 -1.659007e-02 -6.740870e-04 7.382039e-03 1.210061e-02 -1.311330e-02 -1.483248e-03
[683] -1.751637e-02 -6.815865e-03 6.508060e-03 -2.136788e-02 -2.530993e-03 1.488816e-02 1.832252e-02 -8.899697e-03 1.194169e-02 3.064954e-03 -3.807099e-03
[694] 1.314950e-02 -8.331355e-03 1.083073e-02 9.745211e-03 8.066505e-03 1.283475e-02 9.384404e-07 -1.226884e-02 4.745212e-03 -2.609717e-03 -1.436531e-02
[705] 1.118885e-04 -2.807556e-03 3.297550e-03 8.606841e-04 -1.589944e-02 -7.489278e-03 -3.041823e-02 6.346231e-03 -8.145923e-03 8.467570e-03 1.409484e-02
[716] 2.516241e-02 1.310961e-02 8.051662e-03 6.501437e-03 8.243892e-03 4.904457e-03 -6.961192e-03 1.023287e-02 9.190652e-03 -4.274615e-03 -1.839216e-02
[727] 8.133562e-03 -8.254238e-03 1.026470e-02 1.502545e-02 1.672646e-03 -2.998565e-03 -5.046019e-03 8.156186e-03 2.409254e-03 8.583614e-04 8.241936e-03
[738] 2.945919e-03 -2.449202e-04 -5.987261e-03 -5.562012e-03 -2.187688e-03 -5.714339e-03 1.075467e-02 5.199342e-03 4.219208e-03 -9.434361e-04 -4.813769e-03
[749] -2.860043e-03 6.088289e-04 9.443094e-04 9.148223e-03 -3.825891e-03 1.756501e-03 6.188143e-03 -1.254281e-02 4.546922e-03 7.879203e-03 1.372679e-02
[760] 4.357450e-03 -6.472814e-03 -3.305826e-03 5.663605e-03 -5.114846e-03 -5.210862e-03 6.475873e-03 1.499670e-02 -5.390960e-04 -5.750199e-03 3.107844e-03
[771] -1.668978e-03 -2.513524e-02 7.486729e-03 -1.598701e-02 1.252468e-02 1.392702e-02 1.861250e-03 4.280086e-03 9.474454e-03 2.981212e-03 5.064306e-03
[782] -2.092092e-03 3.880832e-03 4.135441e-03 -2.687487e-03 -1.363423e-03 -7.820927e-03 -1.042494e-03 -9.077366e-03 3.251713e-03 1.126525e-02 -2.246999e-02
[793] -1.016585e-02 2.367434e-02 -7.056391e-03 -1.834927e-02 -1.291824e-02 1.798565e-02 -1.367104e-03 1.285250e-02 6.394348e-03 1.149394e-02 -2.953068e-03
[804] 9.277186e-03 -5.489908e-03 6.974323e-03 -1.748123e-02 1.456250e-03 5.051265e-03 -5.654320e-03 -1.041088e-02 5.231081e-03 1.532547e-02 2.738370e-04
[815] -3.563279e-03 3.512864e-03 1.438152e-02 1.386591e-02 7.960886e-04 -2.005857e-03 4.604852e-03 6.822579e-03 2.948011e-04 3.685267e-03 -3.939740e-03
[826] 1.172574e-02 3.455549e-03 -4.988741e-03 -1.036233e-02 9.941172e-03 -1.026289e-02 1.063330e-02 2.142031e-03 9.722556e-04 -3.141234e-03 8.788587e-03
[837] -9.523588e-03 3.134675e-03 -8.550123e-03 1.177046e-03 6.436586e-03 9.697604e-03 -1.235048e-02 -8.947491e-03 -2.331572e-02 1.099986e-02 1.572605e-02
[848] -1.688364e-03 -1.249939e-02 -2.211031e-03 8.627452e-03 2.131737e-03 8.178695e-03 -4.423552e-04 8.853049e-04 -4.823956e-05 1.791815e-03 -3.301276e-03
[859] 3.268948e-03 -5.873255e-03 1.008559e-02 -1.279465e-03 4.095413e-04 -3.215919e-03 5.008795e-03 8.985508e-04 2.252081e-03 -3.275111e-03 -5.023810e-03
[870] -1.828067e-03 -1.245882e-02 1.164659e-02 6.839271e-03 -1.945541e-03 3.347842e-03 5.613963e-03 -1.262062e-04 2.731062e-03 -1.825647e-04 6.551304e-03
[881] 6.937656e-03 -2.124600e-03 1.999820e-03 -9.158009e-03 1.046411e-02 4.098650e-03 -2.429607e-03 -1.313224e-03 -7.876479e-04 -1.077432e-02 -1.536106e-02
[892] 1.171945e-02 1.060772e-02 9.388631e-04 8.365350e-03 5.070537e-03 -7.105167e-03 1.806045e-03 3.145314e-03 -3.997797e-03 -4.215254e-03 7.635688e-03
[903] -4.761821e-03 3.565075e-03 2.942739e-03 -1.399879e-03 1.071224e-03 2.331468e-03 3.202349e-03 2.253955e-03 7.281269e-04 -7.241773e-03 -1.273570e-02
[914] 4.124732e-04 9.187997e-03 8.659820e-03 1.965512e-03 1.015346e-03 -6.042170e-03 7.526304e-03 5.119402e-03 -1.131005e-03 -1.094909e-03 4.157438e-03
[925] -1.717134e-03 -2.817675e-03 -3.205191e-03 -4.347725e-03 -9.281429e-03 1.455734e-03 -5.478452e-03 6.927013e-03 -7.168525e-04 -1.019900e-02 -1.907428e-02
[936] -1.166364e-03 8.577817e-03 1.390275e-02 -4.492299e-04 -2.502100e-03 -2.269342e-02 8.728076e-04 -1.136533e-02 1.101621e-02 -1.326799e-02 9.217382e-03
[947] 1.940523e-03 1.037642e-02 -6.014579e-03 -2.815955e-03 -6.715206e-03 7.858693e-03 1.417115e-02 1.052286e-02 4.513025e-04 6.362919e-03 4.261844e-03
[958] 1.792070e-03 1.394294e-03 3.960132e-03 4.048548e-03 -6.313119e-03 8.391877e-03 1.945808e-03 -2.412179e-04 3.233661e-03 7.087738e-03 4.747562e-03
[969] 5.193879e-03 7.077379e-04 -3.158284e-03 -1.018377e-02 -6.732840e-04 6.167597e-03 1.340426e-04 2.643801e-03 -1.803836e-03 3.143880e-03 -8.560109e-04
[980] -3.060216e-03 -4.413531e-05 2.868418e-03 -2.513242e-02 1.072741e-02 -1.770818e-02 -1.398441e-02 1.200681e-02 -3.627510e-03 5.310940e-03 2.496222e-02
[991] 1.162753e-03 -7.713912e-03 9.086411e-03 -7.917080e-03 -7.290221e-03 1.459048e-02 -5.021091e-03 -1.603404e-02 -1.136537e-02 1.494777e-02
[ reached getOption("max.print") -- omitted 508 entries ]
#Checking of significance of ARMA
coeftest(model2)
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
ar1 -0.23989886 0.03995719 -6.0039 1.926e-09 ***
ar2 0.75146942 0.03853706 19.4999 < 2.2e-16 ***
ar3 -0.37472576 0.03497353 -10.7146 < 2.2e-16 ***
ar4 -0.84276029 0.03682745 -22.8840 < 2.2e-16 ***
ma1 0.13658466 0.05206068 2.6236 0.008701 **
ma2 -0.70983378 0.04782940 -14.8410 < 2.2e-16 ***
ma3 0.46110583 0.04417324 10.4386 < 2.2e-16 ***
ma4 0.67974688 0.04829892 14.0737 < 2.2e-16 ***
intercept 0.00037583 0.00029508 1.2736 0.202794
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#point forecast is called out of sample forecast
autoplot(forecast(model2, h=500))
Explanation:
Auto ARIMA: gave order of ARIMA (4,0,4)
i.e. no autoregressive (AR) terms, no differencing (D) terms, and one moving average (MA) term.
Log likelihood: 4476.69 This is a measure of the model’s goodness of fit. A higher log likelihood indicates a better fit.
AIC: -8935.38 The Akaike Information Criterion (AIC) is a measure of model complexity and fit. A lower AIC indicates a better model.
sigma^2: 0.0001553 This is the estimated variance of the residuals, representing the model’s ability to fit the data. A smaller value suggests a better fit.
Implication: The ARIMA(4,0,4) model provides a parsimonious representation of the LRNSEI time series. The model suggests that the current value of the series is influenced by the previous period’s error.
The significance test indicate that the MA1 coefficient in the ARIMA(4,0,4) model is not statistically significant. The intercept coefficient is close to being statistically significant, but more evidence is needed to confirm its significance.
3.N225
acf(LRN225)
pacf(LRN225)
#Using Auto arima
arma_pq_LRN225 = auto.arima(LRN225); arma_pq_LRN225
Series: LRN225
ARIMA(0,0,0) with zero mean
sigma^2 = 0.0001486: log likelihood = 4371.79
AIC=-8741.58 AICc=-8741.58 BIC=-8736.29
#Application of ARIMA
model2 = arima(LRN225,order = c(0,0,0))
model2
Call:
arima(x = LRN225, order = c(0, 0, 0))
Coefficients:
intercept
2e-04
s.e. 3e-04
sigma^2 estimated as 0.0001485: log likelihood = 4372.08, aic = -8740.15
et = residuals(model2)
et
Time Series:
Start = 1
End = 1463
Frequency = 1
[1] 8.576735e-03 5.454471e-03 -2.835607e-03 -3.516030e-03 -2.631811e-03 2.336673e-03 9.699757e-03 -3.732455e-03 -4.649030e-03 1.637493e-03 1.058558e-04
[12] 1.260052e-02 -7.871604e-03 -1.163779e-02 -1.831628e-03 -3.489563e-04 -1.462188e-02 -8.591574e-03 1.640918e-02 -9.290982e-03 -2.602584e-02 -4.864933e-02
[23] 1.382822e-03 1.103621e-02 -2.373219e-02 -6.713332e-03 -4.510876e-03 1.434432e-02 1.158079e-02 1.931544e-02 -1.041122e-02 1.841272e-03 -1.096611e-02
[34] 6.925355e-03 1.160311e-02 1.036532e-02 -1.471009e-02 -1.594160e-02 -2.554593e-02 -6.851514e-03 1.745434e-02 -7.976979e-03 5.171421e-03 4.480122e-03
[45] 1.615088e-02 6.338334e-03 -8.965168e-03 9.820440e-04 -6.103361e-03 -9.306414e-03 -4.904305e-03 9.579691e-03 -4.640619e-02 6.922745e-03 2.595665e-02
[56] -1.374902e-02 5.815400e-03 1.361457e-02 -3.309415e-03 -4.753573e-03 1.038112e-03 1.492793e-02 -3.846849e-03 4.880021e-03 5.098070e-03 -5.173230e-03
[67] -1.478885e-03 5.212714e-03 2.362726e-03 3.107578e-04 1.387556e-02 1.245877e-03 -1.546374e-03 -3.595133e-03 8.327324e-03 -3.064263e-03 4.442056e-03
[78] 6.379189e-03 1.544427e-03 -1.808761e-03 -4.914989e-04 1.605313e-03 -4.685511e-03 3.691181e-03 1.130646e-02 4.465672e-03 -2.335813e-03 -4.668292e-03
[89] 5.076865e-03 3.778365e-03 2.894022e-03 -2.070269e-03 -1.209695e-02 -1.144246e-02 3.725184e-04 1.107318e-03 -5.712513e-03 -1.556095e-02 8.048960e-03
[100] -1.614810e-03 1.340306e-02 2.584254e-03 3.575291e-03 8.450981e-03 -5.899002e-03 4.573642e-03 3.011934e-03 3.598988e-03 -1.020854e-02 4.721942e-03
[111] -7.771094e-03 -1.811825e-02 1.211318e-02 5.840981e-03 -8.036621e-03 -8.208462e-03 -6.910703e-05 -3.389805e-03 -3.033402e-04 1.289443e-03 -2.257326e-02
[122] -1.452075e-03 -3.390667e-03 -8.102446e-03 1.088825e-02 1.180421e-02 6.299343e-03 -1.223727e-02 1.135204e-02 1.804136e-02 -2.414256e-04 4.174540e-03
[133] 4.015639e-03 -1.536882e-03 -3.180058e-03 -1.358641e-02 4.812988e-03 4.357814e-03 -1.452938e-03 5.316289e-03 -7.661658e-03 1.524167e-04 8.278570e-03
[144] -1.058946e-02 3.203433e-04 -1.034603e-03 6.640147e-03 -1.054972e-03 -2.271364e-03 -1.361954e-02 -2.020111e-02 2.231600e-02 -7.057356e-03 -7.901944e-04
[155] 3.282534e-03 -3.451766e-03 6.919856e-04 6.165640e-03 1.914747e-03 8.242884e-03 8.475147e-03 3.649825e-04 1.280638e-03 6.894738e-04 -4.316363e-04
[166] -7.165340e-03 -7.030767e-04 -5.368474e-03 -4.363604e-03 -8.317322e-03 2.714220e-03 1.270787e-02 -2.895768e-03 9.299935e-03 1.166523e-02 1.377010e-02
[177] 1.046006e-02 -1.396184e-04 7.961400e-03 2.700630e-03 3.657741e-03 -1.015354e-02 1.325296e-02 4.957330e-03 7.833573e-04 -6.841408e-03 -5.870529e-03
[188] -8.277528e-03 -1.354572e-02 1.318898e-03 -3.995342e-02 4.342864e-03 -1.907220e-02 1.216106e-02 1.261958e-02 -8.283749e-03 -5.821409e-03 3.423957e-03
[199] -2.731458e-02 3.404693e-03 -3.818190e-02 -4.204882e-03 -1.885424e-03 1.419249e-02 2.111466e-02 -1.091892e-02 2.507261e-02 -1.585793e-02 1.105396e-02
[210] -3.042433e-03 1.775747e-02 -1.082198e-02 6.404613e-04 -2.108416e-02 1.406005e-03 -2.205286e-03 -5.911545e-03 6.232871e-03 -1.121009e-02 -3.749386e-03
[221] 6.201171e-03 7.372727e-03 6.174788e-03 9.938680e-03 3.610101e-03 3.724223e-03 9.717260e-03 -2.439410e-02 -5.552310e-03 -1.948208e-02 7.959608e-03
[232] -2.165013e-02 -3.615734e-03 2.103293e-02 9.590283e-03 -2.067969e-02 5.917433e-03 -1.860939e-02 -6.299358e-03 -2.901734e-02 -1.140513e-02 -5.164642e-02
[243] 8.662367e-03 3.785808e-02 -3.376667e-03 -2.312499e-02 2.385058e-02 7.962200e-03 1.073656e-02 -1.321299e-02 9.427037e-03 9.319439e-03 -5.731412e-03
[254] -2.223576e-03 1.260567e-02 2.332419e-03 -4.905909e-03 -1.657818e-03 -1.168829e-03 9.380820e-03 -6.255584e-03 5.157396e-04 -5.486390e-03 1.025715e-02
[265] 4.755964e-04 4.336166e-03 -2.126017e-03 1.178152e-03 -6.140794e-03 -2.059578e-02 2.554033e-02 1.310218e-02 -4.670196e-04 -1.161539e-02 1.783381e-02
[276] 7.354925e-04 5.788425e-03 1.285078e-03 -2.047019e-03 4.541436e-03 -3.910309e-03 4.740187e-03 -8.222043e-03 9.879162e-03 9.861181e-03 -4.639296e-03
[287] -6.218337e-03 -6.782288e-03 -2.050734e-02 4.481134e-03 1.752167e-02 -1.021719e-02 -3.927131e-04 7.425353e-03 5.969786e-03 -1.059495e-03 1.707368e-03
[298] 6.106335e-04 -3.076786e-02 2.104347e-02 -2.561609e-03 -1.650920e-02 7.905046e-03 1.395616e-02 -4.143330e-04 9.379542e-03 2.990338e-04 3.551188e-03
[309] -2.346109e-03 1.638073e-03 -5.530889e-03 8.558613e-04 7.063453e-03 1.331696e-02 2.126220e-03 2.289408e-03 -8.709344e-03 4.745702e-03 5.393239e-04
[320] 1.639963e-03 -2.928813e-03 4.592820e-03 -2.433648e-03 -1.540655e-02 -1.499741e-02 -9.564143e-03 -2.918147e-03 -7.465451e-03 -6.112394e-03 5.501239e-03
[331] -6.185845e-03 8.602678e-03 2.185763e-03 -1.616966e-03 2.717791e-04 -6.473567e-03 -1.846405e-03 2.848869e-03 3.413412e-03 -1.239255e-02 -3.142300e-03
[342] -1.667460e-02 -9.522106e-03 -3.561649e-04 1.760845e-02 -3.406092e-04 5.071846e-03 1.164420e-02 3.058602e-03 -3.763827e-03 -4.876952e-03 3.786711e-03
[353] 9.518546e-05 -7.429147e-03 1.683237e-02 5.786634e-03 -9.801966e-03 1.044265e-03 -4.581363e-03 -5.313323e-03 1.161877e-02 -3.162997e-03 2.087511e-02
[364] 8.761669e-04 -5.593034e-03 2.725266e-03 1.780799e-03 -1.003946e-02 1.187862e-03 -1.711074e-03 4.856151e-03 1.714340e-03 -7.212596e-03 -3.314149e-03
[375] -2.013790e-02 1.955306e-02 -2.582693e-03 9.242979e-03 3.852212e-03 1.920280e-03 -4.774478e-03 -2.152444e-03 4.028974e-03 -8.928855e-03 6.624202e-04
[386] -2.153474e-02 -1.779239e-02 -6.777053e-03 -3.586775e-03 3.494372e-03 4.190498e-03 -1.139270e-02 9.473496e-03 -1.239334e-02 4.032936e-04 6.803146e-03
[397] 5.290087e-03 -3.081930e-03 2.162828e-04 3.769347e-03 -2.220226e-02 9.338943e-03 8.988974e-04 -1.144702e-03 1.158612e-02 -4.315507e-03 -3.946157e-07
[408] 9.205794e-04 2.069131e-02 5.133046e-03 5.349145e-03 3.208767e-03 9.326492e-03 7.224450e-03 1.021310e-02 3.510439e-04 -2.088901e-03 3.564418e-03
[419] 1.328740e-03 6.526861e-04 -3.808576e-03 1.033404e-03 -7.951496e-03 -5.881925e-03 5.688802e-03 -5.125607e-03 -2.050490e-02 2.961191e-03 -1.875122e-03
[430] 9.652245e-03 -6.346730e-03 4.204211e-03 1.114896e-02 1.831753e-02 1.165255e-02 -1.179017e-03 1.575050e-03 2.254967e-03 3.144596e-03 5.277753e-03
[441] 1.919299e-03 2.712958e-03 4.420802e-03 -5.960323e-03 3.425593e-03 -3.573590e-03 1.716451e-02 1.985154e-03 8.950810e-04 2.393248e-03 -2.810970e-03
[452] 7.791168e-03 -8.787214e-03 -7.917439e-03 6.724691e-03 4.614717e-03 -5.555544e-03 -6.446281e-03 -5.004241e-03 2.978444e-03 7.513252e-03 3.209036e-03
[463] 2.512164e-03 -1.463658e-03 -5.176037e-03 9.821568e-03 -6.623526e-03 -1.075769e-02 6.859207e-03 2.086778e-03 3.020249e-03 -1.117146e-03 -1.024728e-03
[474] 1.166243e-03 2.497869e-02 -3.190853e-03 4.497157e-03 -5.728437e-03 -3.152772e-03 -2.263962e-03 -5.340173e-05 1.560715e-04 -2.245521e-03 5.713627e-03
[485] -3.892786e-03 -7.867700e-03 -1.952267e-02 1.561426e-02 -1.610140e-02 2.255703e-02 4.410827e-03 7.052472e-03 -4.771508e-03 4.503563e-04 4.266358e-03
[496] 1.514427e-03 -9.374254e-03 6.723250e-03 -1.010669e-02 1.091564e-03 -2.074937e-02 -5.731172e-03 6.784639e-03 -1.757038e-02 9.607734e-03 -1.034349e-02
[507] 4.650416e-03 9.885803e-03 2.323888e-02 -2.153706e-03 -6.218634e-03 7.129410e-03 -1.645545e-03 -6.140198e-03 -7.203823e-03 -1.434527e-02 8.639442e-03
[518] 3.105481e-03 -4.185030e-03 -3.422137e-02 -8.201243e-03 -2.178435e-02 -3.762091e-02 9.225962e-03 -1.256160e-02 5.802403e-04 1.055590e-02 -2.778046e-02
[529] -5.221995e-02 8.268957e-03 -2.320690e-02 -4.535317e-02 -6.297712e-02 -2.516129e-02 3.166008e-04 -1.713541e-02 -1.068166e-02 1.979173e-02 6.865751e-02
[540] 7.707234e-02 -4.641570e-02 3.785797e-02 -1.606833e-02 -9.081072e-03 -4.630386e-02 -1.399086e-02 -1.590016e-04 4.131314e-02 1.968537e-02 2.080502e-02
[551] -6.275183e-04 7.622347e-03 -2.385836e-02 3.054571e-02 -4.769282e-03 -1.362415e-02 3.074344e-02 -1.177360e-02 -2.018257e-02 -7.676900e-03 1.487475e-02
[562] -8.896596e-03 2.645847e-02 -8.497648e-04 2.090293e-02 -2.909527e-02 2.579351e-03 2.506841e-02 1.018862e-02 -1.427951e-03 -5.135408e-03 -1.777574e-02
[573] 5.900496e-03 4.551060e-03 1.453526e-02 7.640979e-03 -2.323686e-03 -8.260448e-03 1.694800e-02 2.496743e-02 6.695082e-03 2.270057e-02 -1.995993e-03
[584] 8.156385e-03 1.161862e-02 1.258271e-02 3.377266e-03 7.133155e-03 1.341459e-02 -4.005076e-03 1.226462e-03 -2.884292e-02 -7.719607e-03 -3.558244e-02
[595] 4.742965e-02 -5.856754e-03 -4.717938e-03 5.260102e-03 -2.090187e-03 4.728151e-03 -8.949024e-04 -1.249905e-02 1.102876e-02 -2.347655e-02 1.299637e-02
[606] -7.735747e-03 8.532993e-04 6.980685e-03 1.788216e-02 -4.642576e-03 -8.056161e-03 3.789837e-03 -1.088311e-02 2.167509e-02 -8.957498e-03 1.550546e-02
[617] -7.903602e-03 -3.493889e-03 6.860679e-04 7.071502e-03 -6.053162e-03 -1.814409e-03 -2.818662e-03 -1.179519e-02 -2.828984e-03 -2.881279e-02 2.186979e-02
[628] 1.665812e-02 -2.850098e-03 -4.545584e-03 -4.183987e-03 1.840593e-02 3.869660e-03 1.736011e-02 1.466821e-03 -8.546088e-03 -2.220714e-03 2.337740e-03
[639] -1.024299e-02 1.491363e-03 2.599567e-03 1.320927e-02 -4.951477e-04 -3.768332e-03 -1.439650e-02 1.093192e-02 -3.144391e-04 4.461809e-03 9.108520e-03
[650] -1.138764e-02 -5.230291e-03 7.703631e-03 -1.067595e-02 8.530637e-03 7.091898e-03 6.265910e-03 -4.683077e-03 6.381179e-04 -6.915689e-03 1.512299e-03
[661] -8.327977e-04 -1.138287e-02 4.804715e-03 1.290195e-02 9.266957e-04 -1.539362e-02 -6.958693e-03 1.193947e-02 4.960750e-03 -7.071089e-04 9.287031e-03
[672] -1.399993e-03 -2.827357e-03 1.585946e-03 8.151893e-04 -5.312090e-03 -4.359249e-03 1.082454e-02 -4.648538e-03 2.826878e-03 -7.253907e-03 1.559790e-03
[683] -1.188014e-03 -6.049435e-04 -3.110717e-03 -3.944937e-03 -1.556523e-02 1.351853e-02 1.677299e-02 1.691567e-02 8.841803e-03 2.069328e-02 2.402035e-03
[694] 1.742924e-02 6.492613e-03 -5.545714e-03 2.007638e-02 3.906741e-03 -1.131472e-02 -3.893932e-03 -4.423102e-03 2.445258e-02 4.762908e-03 8.860746e-03
[705] 3.797554e-03 -8.195440e-03 1.305874e-02 2.602269e-04 7.152414e-05 -2.412011e-03 -7.888961e-03 -3.273027e-03 1.292792e-02 -2.544746e-03 -4.125464e-03
[716] 2.752675e-03 -1.911189e-03 2.361635e-03 1.598223e-03 -1.857228e-03 -2.072866e-03 -1.070342e-02 3.096813e-03 5.156297e-03 -6.817535e-04 7.137325e-03
[727] 2.600383e-02 -4.748804e-03 -7.034154e-03 -3.907563e-03 -4.029762e-03 1.567908e-02 2.308907e-02 6.576520e-04 1.008170e-02 8.215297e-03 -6.501079e-03
[738] -1.000056e-02 1.351687e-02 -4.097536e-03 7.915014e-03 -4.612015e-03 6.401851e-03 -9.867323e-03 2.872571e-03 -1.564806e-02 -1.936201e-02 1.509972e-02
[749] 9.363739e-03 9.733634e-03 -1.092969e-02 1.506810e-02 2.070948e-02 3.746383e-03 1.688526e-03 -1.692245e-03 1.868666e-02 1.242885e-02 -6.020267e-03
[760] -2.095092e-03 -7.483130e-03 4.348920e-03 -1.643260e-02 1.635557e-02 -4.090905e-02 2.355284e-02 -8.886235e-03 4.877686e-03 -2.175016e-02 -2.518084e-03
[771] -4.444710e-03 9.614413e-03 5.552329e-05 5.770111e-03 1.693850e-02 1.410783e-03 4.922739e-03 -4.673709e-04 9.817348e-03 -1.439623e-02 -2.119997e-02
[782] -6.369354e-03 -2.081308e-02 1.111282e-02 1.519127e-02 6.856145e-03 1.396860e-03 -8.905255e-03 6.932131e-03 1.546141e-02 7.607705e-03 -1.337579e-02
[793] 9.081517e-04 -9.752304e-04 1.745227e-03 -7.975151e-03 6.939502e-03 -4.641413e-03 4.908685e-04 1.129968e-03 -1.740501e-04 -2.014447e-02 -2.078862e-02
[804] 2.331799e-02 -5.997927e-03 3.390747e-03 -4.864427e-03 1.897576e-03 -8.582722e-03 1.760227e-02 6.599729e-04 5.211373e-03 -3.154617e-02 -1.648955e-02
[815] -2.540665e-02 2.268169e-02 -9.529415e-03 2.045974e-02 -1.308066e-02 1.675148e-03 7.542922e-03 1.409149e-03 6.412702e-03 2.843014e-03 -3.499961e-03
[826] 2.057100e-02 -1.021678e-02 -1.827579e-03 4.322283e-03 3.619288e-03 -4.261796e-03 2.440415e-03 -2.161985e-03 -3.795633e-03 3.140136e-03 -5.809365e-04
[837] 7.091884e-03 9.297391e-03 -5.359268e-03 -9.594359e-03 -2.112683e-03 -3.370309e-02 3.045613e-02 -5.613837e-04 -2.296561e-04 6.349712e-03 -8.664073e-04
[848] -8.378615e-03 -9.733202e-04 -3.180292e-03 2.410857e-03 -6.692654e-03 1.331614e-03 -9.933168e-03 -9.055151e-03 -6.578025e-03 2.200709e-02 4.968146e-03
[859] -4.070360e-03 -1.182230e-02 -1.004958e-02 -1.283111e-02 -9.855444e-03 5.577703e-03 1.006139e-02 4.666220e-03 -1.423076e-02 7.010953e-03 -1.835945e-02
[870] 1.782619e-02 -5.264254e-03 -2.332836e-03 4.966807e-03 3.068135e-03 2.203865e-03 6.276244e-03 -2.220198e-03 -1.594084e-03 -1.660064e-02 -3.834622e-03
[881] 5.628009e-03 -1.134985e-02 -1.011066e-02 1.740762e-02 8.372611e-03 -5.046508e-04 3.891567e-04 -3.894090e-03 5.103970e-03 1.050515e-02 1.254534e-02
[892] 3.004160e-03 2.003266e-02 1.785056e-02 8.361080e-03 8.579996e-03 -5.990676e-03 1.213330e-02 1.913109e-03 7.047209e-03 -5.419076e-03 -6.434293e-03
[903] 5.569215e-03 -2.212969e-02 -6.976943e-03 2.011087e-02 -5.307350e-04 -2.098291e-03 -2.166165e-02 -3.347653e-03 -2.365528e-02 -1.164325e-02 -2.237862e-02
[914] -1.083754e-02 5.168828e-03 1.306390e-02 1.564865e-02 -9.675497e-03 -3.446277e-03 1.424610e-02 1.772869e-02 -1.727633e-03 6.285225e-03 1.127842e-03
[925] -1.911472e-02 3.106301e-03 -7.364129e-03 1.728219e-02 -5.084003e-04 -9.846417e-03 2.274469e-03 2.553361e-02 -4.506566e-03 8.979495e-03 -6.395672e-03
[936] -3.777355e-03 -7.779491e-03 -6.361492e-03 5.619039e-03 1.103815e-02 5.377015e-03 8.097922e-04 -4.268194e-03 -3.266372e-03 4.719749e-03 7.075074e-04
[947] -1.620233e-02 6.446105e-03 -2.591317e-02 -1.664207e-02 -1.671643e-02 3.842681e-03 -6.786729e-03 9.661367e-03 -3.894280e-03 1.849636e-02 1.389162e-02
[958] -4.935222e-03 -1.030746e-02 6.861859e-03 -7.525082e-03 7.105504e-04 2.084892e-02 -1.831595e-02 -2.176604e-02 2.029867e-02 1.322038e-03 7.992785e-03
[969] -7.894990e-04 -3.935501e-03 1.335979e-02 -5.839591e-03 -4.233553e-03 1.731962e-02 7.945304e-04 -2.944760e-02 -5.682354e-04 -9.274128e-03 1.882205e-02
[980] -9.901104e-03 -1.313083e-02 7.170879e-03 -2.936903e-03 -2.859781e-02 1.082669e-02 -9.308096e-03 2.157727e-03 -1.694619e-02 -4.674527e-03 -3.187263e-02
[991] 2.044615e-02 1.035600e-02 2.587694e-03 1.642630e-02 -1.091390e-02 7.025430e-03 -7.230852e-03 1.066045e-03 1.052521e-02 3.963337e-03
[ reached getOption("max.print") -- omitted 463 entries ]
#Checking of significance of ARMA
coeftest(model2)
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
intercept 0.00024143 0.00031970 0.7552 0.4501
#point forecast is called out of sample forecast
autoplot(forecast(model2, h=500))
Explanation:
Auto ARIMA: gave order of ARIMA (0,0,0)
i.e. no autoregressive (AR) terms, no differencing (D) terms, and one moving average (MA) term.
Log likelihood: 4371.79 This is a measure of the model’s goodness of fit. A higher log likelihood indicates a better fit.
AIC: -8741.58 The Akaike Information Criterion (AIC) is a measure of model complexity and fit. A lower AIC indicates a better model.
sigma^2: 0.0001486 This is the estimated variance of the residuals, representing the model’s ability to fit the data. A smaller value suggests a better fit.
Implication: The ARIMA(0,0,0) model provides a parsimonious representation of the LRNSEI time series. The model suggests that the current value of the series is influenced by the previous period’s error.
The significance test indicate that the MA1 coefficient in the ARIMA(0,0,0) model is not statistically significant. The intercept coefficient is close to being statistically significant, but more evidence is needed to confirm its significance. 4.HSI
acf(LRHSI)
pacf(LRHSI)
#Using Auto arima
arma_pq_LRHSI = auto.arima(LRHSI); arma_pq_LRHSI
Series: LRHSI
ARIMA(0,0,0) with zero mean
sigma^2 = 0.000208: log likelihood = 4159.46
AIC=-8316.92 AICc=-8316.92 BIC=-8311.62
#Application of ARIMA
model2 = arima(LRHSI,order = c(0,0,0))
model2
Call:
arima(x = LRHSI, order = c(0, 0, 0))
Coefficients:
intercept
-4e-04
s.e. 4e-04
sigma^2 estimated as 0.0002079: log likelihood = 4160.01, aic = -8316.03
et = residuals(model2)
et
Time Series:
Start = 1
End = 1475
Frequency = 1
[1] 1.889215e-03 6.121947e-03 2.934417e-03 3.145762e-03 4.008989e-03 2.401995e-03 1.895516e-03 9.738628e-03 -1.953261e-03 1.829048e-02 2.857167e-03
[12] 4.716666e-03 4.525143e-03 4.680066e-03 1.684505e-02 1.244405e-03 -8.879152e-03 1.558064e-02 -5.268549e-03 -1.057316e-02 8.944517e-03 -7.088350e-03
[23] -8.409554e-04 -1.060230e-02 -5.212478e-02 -8.542519e-03 4.609348e-03 -3.109120e-02 -1.226141e-03 1.320785e-02 2.279875e-02 1.986055e-02 -7.406645e-03
[34] 1.831529e-02 -1.454879e-02 1.008391e-02 7.769158e-03 -6.932032e-03 -1.325598e-02 6.842731e-03 -1.455989e-02 -2.266104e-02 2.106996e-02 -9.943777e-03
[45] 1.543491e-02 1.147959e-02 1.950744e-02 6.200375e-04 -4.886015e-03 3.763946e-03 -8.466059e-04 7.688957e-04 1.541825e-03 -3.906436e-03 -1.059892e-02
[56] -2.442757e-02 8.264905e-03 8.287246e-03 -2.487411e-02 2.751899e-03 3.272244e-03 -2.176442e-02 1.138642e-02 1.320036e-02 1.677220e-02 5.878454e-03
[67] -1.757632e-03 -3.482443e-04 -1.572993e-02 -7.980500e-03 7.735645e-03 1.430448e-02 -9.097395e-03 -5.009015e-03 1.293672e-02 -9.712559e-03 -1.022827e-02
[78] 9.450947e-03 1.767416e-02 -2.354014e-03 -1.305666e-02 -1.244973e-02 2.656380e-03 1.392377e-02 4.770597e-03 9.297831e-03 1.049762e-02 1.376865e-02
[89] -1.201670e-02 -9.489414e-04 -5.021637e-03 3.806889e-03 6.381671e-03 -1.798088e-02 3.480382e-03 -5.224693e-03 7.049033e-03 -9.647634e-03 -1.373769e-02
[100] 1.400152e-02 1.193586e-03 1.682259e-02 3.469838e-03 5.708093e-03 8.472657e-03 -1.735545e-02 3.796382e-03 1.661048e-03 -1.182994e-02 -8.923702e-03
[111] -3.907509e-03 -2.775611e-02 8.102779e-03 -1.317062e-02 1.849449e-03 -1.254912e-02 -2.371049e-03 -1.795526e-02 5.356983e-03 1.633135e-02 -1.385018e-02
[122] -1.030849e-02 -1.717147e-03 5.121634e-03 1.347751e-02 1.768521e-04 -1.260896e-02 6.351191e-03 1.959803e-03 8.931360e-04 -1.222786e-02 -1.888067e-03
[133] -3.402307e-03 7.992166e-03 1.515071e-03 1.467679e-02 9.367162e-03 -4.449464e-03 1.198363e-03 -2.078387e-03 -4.843632e-03 -8.117390e-03 -2.194769e-02
[144] -9.860082e-04 5.556938e-03 1.570918e-02 4.290291e-03 9.107292e-03 -8.054153e-03 -1.488174e-02 -6.200452e-03 -1.519625e-02 -7.819731e-03 4.568643e-03
[155] 1.442887e-02 5.987061e-03 6.673125e-03 -4.527171e-03 -3.881754e-03 2.182447e-02 3.232796e-03 2.678424e-03 -8.526729e-03 -9.435398e-03 -5.936521e-03
[166] 9.761657e-03 -2.602938e-02 -9.529210e-03 3.446997e-04 -1.304349e-02 -6.803022e-03 -2.543122e-03 2.548814e-02 1.041012e-02 -1.264733e-02 6.015538e-03
[177] 1.223914e-02 2.956481e-03 1.756634e-02 -1.598670e-02 1.187353e-02 -3.249953e-03 3.019748e-03 -2.372152e-02 -9.008267e-04 -1.700828e-02 -1.533924e-03
[188] -1.362725e-02 -7.378640e-04 1.164705e-03 -3.562592e-02 2.135276e-02 -1.351588e-02 1.070440e-03 9.192610e-05 4.583610e-03 2.328097e-02 -3.093227e-02
[199] -3.430509e-03 -9.768444e-03 -1.074272e-02 4.206926e-03 -8.776218e-03 1.629978e-02 1.771056e-02 4.164533e-02 -2.066485e-02 7.562915e-03 1.417469e-03
[210] 3.450798e-03 -2.375481e-02 1.614981e-03 6.605203e-03 -4.987077e-03 1.774175e-02 3.462024e-03 7.567014e-03 -1.997128e-02 5.456557e-03 2.238882e-03
[221] -3.136959e-03 1.754494e-02 -1.283139e-03 1.362148e-02 -8.320383e-03 2.499078e-03 2.555174e-02 3.274853e-03 -1.590588e-02 -2.464803e-02 -3.152603e-03
[232] -1.162402e-02 1.143473e-03 1.637098e-02 1.320583e-02 -1.593279e-02 1.337813e-04 -1.015329e-02 2.373874e-03 -9.000030e-03 5.451121e-03 -3.575293e-03
[243] -6.352764e-03 1.387940e-03 1.369583e-02 -2.767322e-02 -2.234639e-03 2.255645e-02 8.543355e-03 1.932120e-03 2.282197e-02 2.625961e-03 5.878613e-03
[254] -1.353678e-02 2.042073e-02 3.067631e-03 -5.064652e-03 1.284436e-02 4.289882e-03 -6.656323e-03 4.965593e-04 4.561854e-03 1.678594e-02 6.765836e-04
[265] -1.248612e-03 4.424494e-03 1.117542e-02 -2.516285e-05 2.521690e-03 -1.174568e-03 7.437692e-03 1.371033e-03 1.190945e-02 -1.907726e-03 -1.846553e-02
[276] 1.625949e-02 -3.807787e-03 1.047268e-02 4.450080e-03 6.883637e-03 5.344930e-03 -6.091893e-03 -1.135659e-04 -3.935590e-03 6.626423e-03 5.498273e-03
[287] 4.641297e-04 3.015460e-03 -8.535232e-03 -1.893756e-02 1.008536e-02 1.493829e-02 -3.534710e-03 1.918920e-03 5.955031e-03 1.397732e-02 2.340186e-03
[298] -4.548818e-03 -8.147855e-03 1.831492e-03 -2.007938e-02 1.920757e-03 6.026632e-03 2.028059e-03 9.945725e-03 1.781987e-02 2.511777e-03 1.253091e-02
[309] -1.276430e-03 5.088024e-03 3.062298e-03 -8.637787e-04 -8.948762e-03 2.748257e-03 -2.922024e-03 1.104366e-02 2.224821e-04 -4.978069e-03 3.940813e-04
[320] -4.872557e-03 -8.232279e-03 2.261327e-03 1.006914e-02 -6.106210e-03 8.612647e-03 4.971815e-03 -2.901236e-02 5.625812e-03 -1.193517e-02 -2.375850e-02
[331] 8.807178e-03 -1.471773e-02 5.597423e-03 6.196695e-04 -1.129521e-02 -5.305622e-03 -4.307936e-03 2.153997e-03 -1.557010e-02 3.572954e-03 -2.015129e-03
[342] 4.151971e-03 -5.283828e-03 -4.051595e-03 -7.521153e-03 1.259172e-04 -4.538234e-03 5.386451e-03 2.988084e-03 2.288623e-02 8.005639e-03 -1.706118e-02
[353] -1.089006e-04 -6.087606e-03 4.399137e-03 1.032098e-02 2.565136e-02 1.266884e-02 -2.296015e-03 1.773618e-03 -1.114068e-02 1.671149e-03 1.444900e-02
[364] -2.362274e-03 1.199194e-02 -3.126867e-04 -1.664943e-03 -3.327025e-04 -1.512537e-02 -7.237471e-03 3.534247e-03 8.414741e-03 1.794240e-03 3.314841e-03
[375] 2.659320e-03 -5.298581e-04 -4.215218e-03 1.101010e-02 -1.340190e-02 3.745352e-03 2.414670e-03 2.854950e-03 -6.503119e-03 -9.917170e-03 1.820076e-03
[386] -1.279294e-02 -7.268389e-03 -2.336073e-02 -2.852235e-02 -6.322663e-03 1.194724e-03 5.143225e-03 -6.576809e-03 -4.032290e-03 -2.087244e-02 1.224193e-03
[397] 8.000685e-03 9.715950e-03 2.183170e-02 -1.901418e-03 1.861356e-03 -8.065700e-03 5.396247e-03 -1.885011e-02 -2.386277e-04 -1.500364e-03 3.825028e-03
[408] 1.220368e-03 -3.429117e-03 -3.464223e-03 3.864571e-02 1.043353e-04 6.981590e-03 4.401191e-05 4.801559e-04 1.805331e-02 -2.238782e-03 1.013239e-02
[419] -7.980875e-03 -1.200687e-02 -9.544696e-04 -1.032140e-02 -8.633536e-04 -7.705476e-03 2.626956e-03 -1.245912e-02 4.110265e-03 -2.956216e-03 5.676847e-03
[430] -1.507257e-03 2.987916e-03 -1.074629e-02 3.193609e-03 -7.771474e-03 1.372308e-03 2.348502e-02 8.473861e-03 -2.811616e-04 6.426537e-03 7.279507e-03
[441] -4.418224e-03 6.229895e-04 2.656644e-03 -7.832369e-03 9.060397e-03 -4.489136e-03 8.754557e-03 -3.498858e-03 -4.059488e-03 9.317323e-03 7.580401e-03
[452] 1.673753e-02 5.323147e-03 5.840068e-04 6.106007e-03 -6.671804e-03 -2.615943e-02 5.533615e-03 -1.801922e-02 -8.973736e-03 5.075796e-04 1.376768e-02
[463] 1.574461e-02 -7.170272e-03 -1.545104e-02 5.226800e-03 1.524751e-02 -2.540665e-03 1.882821e-03 -1.843785e-03 -2.016339e-02 4.116208e-03 -1.627370e-03
[474] -1.213988e-02 6.304456e-03 1.106838e-02 2.574069e-04 -1.800992e-03 8.262237e-03 1.339692e-02 2.576533e-02 -6.115559e-03 1.252172e-02 1.848224e-03
[485] -2.612224e-03 2.940344e-03 1.651885e-03 -1.118581e-03 1.327462e-02 3.718497e-03 -4.193581e-03 1.286622e-02 -2.834307e-03 -7.555899e-03 3.785508e-03
[496] -7.906705e-03 1.709730e-02 3.094046e-03 1.139408e-02 -2.018779e-03 -3.474617e-03 4.191325e-03 6.379648e-03 -8.611353e-03 -2.815819e-02 1.302518e-02
[507] -1.496268e-02 1.845589e-03 -2.824108e-02 -2.615050e-02 -4.779480e-03 2.078802e-03 1.242513e-02 4.538178e-03 2.644459e-02 -2.863302e-03 -5.568424e-03
[518] 1.289064e-02 9.049901e-03 -2.977151e-03 3.476874e-03 5.558330e-03 -1.508231e-02 4.947030e-03 -1.293512e-03 -1.054349e-02 -1.763393e-02 3.088612e-03
[529] -6.947761e-03 3.466404e-03 -2.412765e-02 6.565872e-03 1.338038e-04 -1.995430e-03 2.099555e-02 -2.308569e-02 -4.283415e-02 1.435602e-02 -5.961958e-03
[540] -3.685327e-02 -1.103066e-02 -4.077508e-02 9.035919e-03 -4.228097e-02 -2.609213e-02 4.964468e-02 -4.945422e-02 4.401606e-02 3.779621e-02 -7.064831e-03
[551] 6.028778e-03 -1.285767e-02 1.871008e-02 -2.178221e-02 8.774721e-03 -1.494983e-03 2.223267e-02 2.140153e-02 -1.133906e-02 1.406622e-02 5.937716e-03
[562] -1.154679e-02 -5.374149e-03 1.583535e-02 -1.657431e-03 -2.190166e-02 4.580735e-03 3.902560e-03 -5.712559e-03 1.905239e-02 1.250474e-02 3.142785e-03
[573] -4.229077e-02 1.112972e-02 1.159426e-02 -6.124648e-03 1.074682e-02 1.562639e-02 -1.419702e-02 -2.305427e-03 -1.420916e-02 -9.603551e-04 6.147625e-03
[584] 1.915911e-02 8.792105e-04 -4.532145e-03 -5.680721e-02 1.358049e-03 1.905945e-02 -3.173824e-03 -6.867183e-03 -7.037427e-03 3.342335e-02 1.143312e-02
[595] 1.404019e-02 2.065715e-03 1.684347e-02 6.514329e-04 1.165027e-02 9.576327e-05 -2.260573e-02 -6.934694e-03 -2.142185e-02 2.396725e-02 6.019690e-03
[606] -2.782774e-04 7.682708e-03 -4.998431e-03 1.642140e-02 -4.667161e-03 -8.994449e-03 -9.787728e-03 5.562572e-03 2.852900e-02 1.025394e-02 3.776123e-02
[617] -1.350213e-02 6.287467e-03 3.489175e-03 -1.819543e-02 2.131021e-03 -1.108748e-02 5.395327e-04 -1.985839e-02 5.128294e-03 -8.487946e-04 2.318634e-02
[628] -2.239890e-02 8.544886e-03 -2.192713e-02 -3.745335e-03 7.260441e-03 4.840571e-03 -6.563867e-03 -4.279772e-03 -5.199941e-03 2.017080e-02 6.624955e-03
[639] -6.479100e-03 -1.573757e-02 -5.910438e-03 2.123047e-02 1.449059e-02 -1.342294e-04 -1.496030e-03 6.898969e-03 1.185076e-03 -7.062652e-03 -1.511557e-02
[650] 1.331737e-02 1.767481e-02 -2.166483e-03 6.131944e-04 -7.902595e-03 5.952981e-03 -9.289693e-03 7.044446e-04 -2.179956e-03 -4.093422e-03 -1.216605e-02
[661] -3.898613e-03 1.804473e-03 -5.936508e-03 -5.976045e-03 8.169608e-03 5.968974e-03 4.140931e-03 1.064542e-04 -1.528967e-02 5.090206e-03 -2.045962e-02
[672] -9.416628e-03 1.476086e-03 -1.794400e-02 -2.855800e-03 1.069768e-02 -8.183489e-03 8.248550e-03 1.346920e-02 9.311152e-03 1.126958e-02 -1.649596e-03
[683] -2.677716e-03 2.215330e-02 1.100787e-03 -2.043733e-02 9.798385e-03 6.749699e-03 1.505639e-03 7.891363e-03 1.674935e-03 5.732184e-03 -4.900009e-03
[694] -2.772745e-03 -4.563191e-03 -1.928716e-02 1.491459e-02 1.981734e-02 -1.756353e-03 3.241591e-02 1.058073e-03 1.211744e-02 1.130170e-02 -2.441826e-03
[705] -1.803879e-03 -8.385979e-05 8.952716e-03 1.660717e-03 5.273925e-03 -6.687107e-03 3.976295e-03 1.704202e-03 4.238399e-03 3.457219e-03 5.992110e-03
[716] 3.195878e-03 -2.038848e-02 8.944889e-03 -9.272798e-04 7.751730e-03 4.405607e-03 -1.194338e-02 -7.266113e-03 7.904295e-03 -3.092098e-03 3.995858e-03
[727] -4.004508e-03 -6.534630e-03 1.000224e-02 8.603182e-03 -6.366912e-03 -6.874266e-03 -6.755564e-03 8.928509e-03 2.043177e-03 -2.334986e-03 9.995578e-03
[738] 2.193937e-02 3.484997e-03 9.230706e-03 6.818567e-03 1.928516e-03 -4.810895e-03 1.229170e-02 1.470263e-03 1.351335e-02 -1.061600e-03 9.605038e-03
[749] 3.093141e-03 1.045495e-02 2.704392e-02 1.113866e-02 -7.644189e-04 -1.577085e-02 2.425755e-02 -2.539163e-02 -2.799422e-03 -2.542457e-02 -9.003103e-03
[760] 2.170316e-02 1.263535e-02 2.401755e-03 -6.245406e-03 6.393832e-03 1.445475e-03 5.725709e-03 1.929917e-02 4.873880e-03 1.920972e-02 1.133680e-02
[771] -1.548330e-02 2.010048e-03 -1.026403e-02 1.065890e-02 -2.991039e-02 1.230039e-02 -3.665871e-02 1.656270e-02 -1.179058e-02 2.700227e-02 -2.138086e-02
[782] -4.353705e-03 -1.894895e-02 8.504494e-03 5.051029e-03 1.679806e-02 -2.183018e-02 3.661485e-03 7.098002e-03 6.162105e-04 1.311231e-02 -1.381116e-02
[793] -3.254421e-03 -1.312728e-02 -2.014077e-02 -2.692582e-04 1.593029e-02 4.607624e-04 8.800154e-03 -6.598445e-03 1.994941e-02 -8.767741e-03 1.195010e-02
[804] -1.032401e-02 -8.197185e-03 1.938905e-03 1.445746e-02 -3.338398e-03 6.508381e-03 5.093405e-03 1.410500e-03 -1.739768e-02 5.045362e-03 1.157892e-02
[815] -3.944977e-03 4.677399e-06 4.869636e-03 8.340694e-03 -1.954036e-02 -1.247602e-02 7.408824e-03 -4.490221e-03 8.088357e-03 -5.419108e-04 -1.293431e-04
[826] -2.016261e-02 8.119159e-03 -1.792112e-02 1.147722e-02 6.318429e-03 1.447264e-02 -4.637226e-03 6.811704e-04 -1.229291e-03 1.779128e-02 9.181434e-03
[837] -1.417596e-03 7.797399e-04 1.334761e-03 1.118297e-02 -5.403941e-03 -1.098778e-02 -1.261324e-03 -4.139352e-03 1.898148e-04 -9.525305e-04 2.642564e-04
[848] 3.980989e-03 -6.689473e-03 -6.672774e-03 4.667012e-03 8.856439e-03 -1.050669e-02 -5.916701e-03 1.815605e-02 2.661325e-03 1.434562e-02 -2.856325e-04
[859] -9.017965e-03 -5.352239e-03 -1.772071e-02 -5.518777e-03 -2.118438e-03 -3.611457e-03 -2.890997e-02 7.419217e-03 6.617934e-03 1.655157e-02 -5.917269e-03
[870] 7.881130e-03 6.950908e-04 -1.816262e-02 -8.026627e-03 -8.779353e-04 1.856718e-02 -1.420643e-02 -4.183054e-02 -4.274447e-02 1.572133e-02 3.289238e-02
[881] -1.316002e-02 1.092311e-02 -1.168494e-03 9.202256e-03 -8.036102e-03 -5.707915e-04 4.359452e-03 1.257960e-02 2.442616e-03 -4.958617e-03 -4.375736e-03
[892] -7.600207e-03 -1.638264e-02 5.088943e-03 -2.112402e-02 -1.820840e-02 1.079806e-02 2.472167e-02 -9.265221e-04 -1.049411e-02 8.783512e-05 5.562756e-03
[903] 1.359838e-02 6.147269e-03 2.779314e-03 -6.854027e-03 1.044524e-02 7.630481e-03 -8.468976e-04 -2.285633e-02 1.926633e-02 -1.468059e-02 -1.174899e-02
[914] -1.816780e-02 -1.430789e-02 1.059515e-02 -3.313027e-02 5.460833e-03 1.227365e-02 -1.269785e-02 1.081461e-03 1.236845e-02 7.030090e-03 -3.173951e-03
[925] -2.179294e-02 3.210710e-03 -5.332693e-03 3.061142e-02 5.890116e-03 1.982165e-02 -1.402257e-02 1.504384e-02 3.500292e-03 1.514044e-02 1.383049e-02
[936] -4.149174e-03 4.590790e-03 5.899000e-04 -3.199644e-03 -1.545824e-02 -2.458078e-03 -6.614124e-03 -8.428322e-03 -1.780235e-03 -2.594627e-03 8.372475e-03
[947] -1.376559e-02 -3.906343e-03 2.386037e-03 7.743188e-03 1.041985e-02 3.557522e-03 2.876629e-03 1.303050e-02 -2.085581e-03 -1.256839e-02 -1.031618e-02
[958] -3.550403e-03 -1.169179e-02 1.769761e-03 2.606547e-03 -2.662991e-02 -9.130319e-03 -1.553632e-02 8.187850e-03 5.874859e-03 -5.406026e-04 -1.731980e-02
[969] 2.719704e-02 9.453309e-04 1.108835e-02 -1.034674e-02 -1.321237e-03 -1.299598e-02 -8.751293e-03 2.729259e-03 -1.172800e-02 -1.910070e-02 1.030249e-02
[980] 6.081295e-03 4.339382e-03 1.692485e-03 2.837552e-03 -7.974245e-03 1.497396e-03 1.267879e-02 -4.872626e-03 1.042858e-03 -1.616902e-02 7.598287e-03
[991] 1.845644e-02 1.111281e-02 7.975279e-05 2.794498e-02 1.525125e-03 -1.508413e-03 -6.407204e-03 -3.960674e-03 1.019531e-03 3.399596e-02
[ reached getOption("max.print") -- omitted 475 entries ]
#Checking of significance of ARMA
coeftest(model2)
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
intercept -0.00039473 0.00037631 -1.049 0.2942
#point forecast is called out of sample forecast
autoplot(forecast(model2, h=500))
Explanation:
Auto ARIMA: gave order of ARIMA (0,0,0)
i.e. no autoregressive (AR) terms, no differencing (D) terms, and no moving average (MA) terms.
sigma^2: 0.0002079. This is the estimated variance of the residuals, representing the model’s ability to fit the data.
Log likelihood: 4160.01. A higher log likelihood indicates a better fit.
AIC: -8316.03. A lower AIC indicates a better model.
Implication: The ARIMA(0,0,0) model suggests that the LRHSI time series is a white noise process. This indicates that there are no predictable patterns or trends in the data.
The significance test The significance test suggests that the intercept coefficient in the ARIMA(0,0,0) model is not statistically significant. 5.N100
acf(LRN100)
pacf(LRN100)
#Using Auto arima
arma_pq_LRN100 = auto.arima(LRN100); arma_pq_LRN100
Series: LRN100
ARIMA(0,0,0) with zero mean
sigma^2 = 0.0001351: log likelihood = 4662.72
AIC=-9323.44 AICc=-9323.44 BIC=-9318.11
#Application of ARIMA
model2 = arima(LRHSI,order = c(0,0,0))
model2
Call:
arima(x = LRHSI, order = c(0, 0, 0))
Coefficients:
intercept
-4e-04
s.e. 4e-04
sigma^2 estimated as 0.0002079: log likelihood = 4160.01, aic = -8316.03
et = residuals(model2)
et
Time Series:
Start = 1
End = 1475
Frequency = 1
[1] 1.889215e-03 6.121947e-03 2.934417e-03 3.145762e-03 4.008989e-03 2.401995e-03 1.895516e-03 9.738628e-03 -1.953261e-03 1.829048e-02 2.857167e-03
[12] 4.716666e-03 4.525143e-03 4.680066e-03 1.684505e-02 1.244405e-03 -8.879152e-03 1.558064e-02 -5.268549e-03 -1.057316e-02 8.944517e-03 -7.088350e-03
[23] -8.409554e-04 -1.060230e-02 -5.212478e-02 -8.542519e-03 4.609348e-03 -3.109120e-02 -1.226141e-03 1.320785e-02 2.279875e-02 1.986055e-02 -7.406645e-03
[34] 1.831529e-02 -1.454879e-02 1.008391e-02 7.769158e-03 -6.932032e-03 -1.325598e-02 6.842731e-03 -1.455989e-02 -2.266104e-02 2.106996e-02 -9.943777e-03
[45] 1.543491e-02 1.147959e-02 1.950744e-02 6.200375e-04 -4.886015e-03 3.763946e-03 -8.466059e-04 7.688957e-04 1.541825e-03 -3.906436e-03 -1.059892e-02
[56] -2.442757e-02 8.264905e-03 8.287246e-03 -2.487411e-02 2.751899e-03 3.272244e-03 -2.176442e-02 1.138642e-02 1.320036e-02 1.677220e-02 5.878454e-03
[67] -1.757632e-03 -3.482443e-04 -1.572993e-02 -7.980500e-03 7.735645e-03 1.430448e-02 -9.097395e-03 -5.009015e-03 1.293672e-02 -9.712559e-03 -1.022827e-02
[78] 9.450947e-03 1.767416e-02 -2.354014e-03 -1.305666e-02 -1.244973e-02 2.656380e-03 1.392377e-02 4.770597e-03 9.297831e-03 1.049762e-02 1.376865e-02
[89] -1.201670e-02 -9.489414e-04 -5.021637e-03 3.806889e-03 6.381671e-03 -1.798088e-02 3.480382e-03 -5.224693e-03 7.049033e-03 -9.647634e-03 -1.373769e-02
[100] 1.400152e-02 1.193586e-03 1.682259e-02 3.469838e-03 5.708093e-03 8.472657e-03 -1.735545e-02 3.796382e-03 1.661048e-03 -1.182994e-02 -8.923702e-03
[111] -3.907509e-03 -2.775611e-02 8.102779e-03 -1.317062e-02 1.849449e-03 -1.254912e-02 -2.371049e-03 -1.795526e-02 5.356983e-03 1.633135e-02 -1.385018e-02
[122] -1.030849e-02 -1.717147e-03 5.121634e-03 1.347751e-02 1.768521e-04 -1.260896e-02 6.351191e-03 1.959803e-03 8.931360e-04 -1.222786e-02 -1.888067e-03
[133] -3.402307e-03 7.992166e-03 1.515071e-03 1.467679e-02 9.367162e-03 -4.449464e-03 1.198363e-03 -2.078387e-03 -4.843632e-03 -8.117390e-03 -2.194769e-02
[144] -9.860082e-04 5.556938e-03 1.570918e-02 4.290291e-03 9.107292e-03 -8.054153e-03 -1.488174e-02 -6.200452e-03 -1.519625e-02 -7.819731e-03 4.568643e-03
[155] 1.442887e-02 5.987061e-03 6.673125e-03 -4.527171e-03 -3.881754e-03 2.182447e-02 3.232796e-03 2.678424e-03 -8.526729e-03 -9.435398e-03 -5.936521e-03
[166] 9.761657e-03 -2.602938e-02 -9.529210e-03 3.446997e-04 -1.304349e-02 -6.803022e-03 -2.543122e-03 2.548814e-02 1.041012e-02 -1.264733e-02 6.015538e-03
[177] 1.223914e-02 2.956481e-03 1.756634e-02 -1.598670e-02 1.187353e-02 -3.249953e-03 3.019748e-03 -2.372152e-02 -9.008267e-04 -1.700828e-02 -1.533924e-03
[188] -1.362725e-02 -7.378640e-04 1.164705e-03 -3.562592e-02 2.135276e-02 -1.351588e-02 1.070440e-03 9.192610e-05 4.583610e-03 2.328097e-02 -3.093227e-02
[199] -3.430509e-03 -9.768444e-03 -1.074272e-02 4.206926e-03 -8.776218e-03 1.629978e-02 1.771056e-02 4.164533e-02 -2.066485e-02 7.562915e-03 1.417469e-03
[210] 3.450798e-03 -2.375481e-02 1.614981e-03 6.605203e-03 -4.987077e-03 1.774175e-02 3.462024e-03 7.567014e-03 -1.997128e-02 5.456557e-03 2.238882e-03
[221] -3.136959e-03 1.754494e-02 -1.283139e-03 1.362148e-02 -8.320383e-03 2.499078e-03 2.555174e-02 3.274853e-03 -1.590588e-02 -2.464803e-02 -3.152603e-03
[232] -1.162402e-02 1.143473e-03 1.637098e-02 1.320583e-02 -1.593279e-02 1.337813e-04 -1.015329e-02 2.373874e-03 -9.000030e-03 5.451121e-03 -3.575293e-03
[243] -6.352764e-03 1.387940e-03 1.369583e-02 -2.767322e-02 -2.234639e-03 2.255645e-02 8.543355e-03 1.932120e-03 2.282197e-02 2.625961e-03 5.878613e-03
[254] -1.353678e-02 2.042073e-02 3.067631e-03 -5.064652e-03 1.284436e-02 4.289882e-03 -6.656323e-03 4.965593e-04 4.561854e-03 1.678594e-02 6.765836e-04
[265] -1.248612e-03 4.424494e-03 1.117542e-02 -2.516285e-05 2.521690e-03 -1.174568e-03 7.437692e-03 1.371033e-03 1.190945e-02 -1.907726e-03 -1.846553e-02
[276] 1.625949e-02 -3.807787e-03 1.047268e-02 4.450080e-03 6.883637e-03 5.344930e-03 -6.091893e-03 -1.135659e-04 -3.935590e-03 6.626423e-03 5.498273e-03
[287] 4.641297e-04 3.015460e-03 -8.535232e-03 -1.893756e-02 1.008536e-02 1.493829e-02 -3.534710e-03 1.918920e-03 5.955031e-03 1.397732e-02 2.340186e-03
[298] -4.548818e-03 -8.147855e-03 1.831492e-03 -2.007938e-02 1.920757e-03 6.026632e-03 2.028059e-03 9.945725e-03 1.781987e-02 2.511777e-03 1.253091e-02
[309] -1.276430e-03 5.088024e-03 3.062298e-03 -8.637787e-04 -8.948762e-03 2.748257e-03 -2.922024e-03 1.104366e-02 2.224821e-04 -4.978069e-03 3.940813e-04
[320] -4.872557e-03 -8.232279e-03 2.261327e-03 1.006914e-02 -6.106210e-03 8.612647e-03 4.971815e-03 -2.901236e-02 5.625812e-03 -1.193517e-02 -2.375850e-02
[331] 8.807178e-03 -1.471773e-02 5.597423e-03 6.196695e-04 -1.129521e-02 -5.305622e-03 -4.307936e-03 2.153997e-03 -1.557010e-02 3.572954e-03 -2.015129e-03
[342] 4.151971e-03 -5.283828e-03 -4.051595e-03 -7.521153e-03 1.259172e-04 -4.538234e-03 5.386451e-03 2.988084e-03 2.288623e-02 8.005639e-03 -1.706118e-02
[353] -1.089006e-04 -6.087606e-03 4.399137e-03 1.032098e-02 2.565136e-02 1.266884e-02 -2.296015e-03 1.773618e-03 -1.114068e-02 1.671149e-03 1.444900e-02
[364] -2.362274e-03 1.199194e-02 -3.126867e-04 -1.664943e-03 -3.327025e-04 -1.512537e-02 -7.237471e-03 3.534247e-03 8.414741e-03 1.794240e-03 3.314841e-03
[375] 2.659320e-03 -5.298581e-04 -4.215218e-03 1.101010e-02 -1.340190e-02 3.745352e-03 2.414670e-03 2.854950e-03 -6.503119e-03 -9.917170e-03 1.820076e-03
[386] -1.279294e-02 -7.268389e-03 -2.336073e-02 -2.852235e-02 -6.322663e-03 1.194724e-03 5.143225e-03 -6.576809e-03 -4.032290e-03 -2.087244e-02 1.224193e-03
[397] 8.000685e-03 9.715950e-03 2.183170e-02 -1.901418e-03 1.861356e-03 -8.065700e-03 5.396247e-03 -1.885011e-02 -2.386277e-04 -1.500364e-03 3.825028e-03
[408] 1.220368e-03 -3.429117e-03 -3.464223e-03 3.864571e-02 1.043353e-04 6.981590e-03 4.401191e-05 4.801559e-04 1.805331e-02 -2.238782e-03 1.013239e-02
[419] -7.980875e-03 -1.200687e-02 -9.544696e-04 -1.032140e-02 -8.633536e-04 -7.705476e-03 2.626956e-03 -1.245912e-02 4.110265e-03 -2.956216e-03 5.676847e-03
[430] -1.507257e-03 2.987916e-03 -1.074629e-02 3.193609e-03 -7.771474e-03 1.372308e-03 2.348502e-02 8.473861e-03 -2.811616e-04 6.426537e-03 7.279507e-03
[441] -4.418224e-03 6.229895e-04 2.656644e-03 -7.832369e-03 9.060397e-03 -4.489136e-03 8.754557e-03 -3.498858e-03 -4.059488e-03 9.317323e-03 7.580401e-03
[452] 1.673753e-02 5.323147e-03 5.840068e-04 6.106007e-03 -6.671804e-03 -2.615943e-02 5.533615e-03 -1.801922e-02 -8.973736e-03 5.075796e-04 1.376768e-02
[463] 1.574461e-02 -7.170272e-03 -1.545104e-02 5.226800e-03 1.524751e-02 -2.540665e-03 1.882821e-03 -1.843785e-03 -2.016339e-02 4.116208e-03 -1.627370e-03
[474] -1.213988e-02 6.304456e-03 1.106838e-02 2.574069e-04 -1.800992e-03 8.262237e-03 1.339692e-02 2.576533e-02 -6.115559e-03 1.252172e-02 1.848224e-03
[485] -2.612224e-03 2.940344e-03 1.651885e-03 -1.118581e-03 1.327462e-02 3.718497e-03 -4.193581e-03 1.286622e-02 -2.834307e-03 -7.555899e-03 3.785508e-03
[496] -7.906705e-03 1.709730e-02 3.094046e-03 1.139408e-02 -2.018779e-03 -3.474617e-03 4.191325e-03 6.379648e-03 -8.611353e-03 -2.815819e-02 1.302518e-02
[507] -1.496268e-02 1.845589e-03 -2.824108e-02 -2.615050e-02 -4.779480e-03 2.078802e-03 1.242513e-02 4.538178e-03 2.644459e-02 -2.863302e-03 -5.568424e-03
[518] 1.289064e-02 9.049901e-03 -2.977151e-03 3.476874e-03 5.558330e-03 -1.508231e-02 4.947030e-03 -1.293512e-03 -1.054349e-02 -1.763393e-02 3.088612e-03
[529] -6.947761e-03 3.466404e-03 -2.412765e-02 6.565872e-03 1.338038e-04 -1.995430e-03 2.099555e-02 -2.308569e-02 -4.283415e-02 1.435602e-02 -5.961958e-03
[540] -3.685327e-02 -1.103066e-02 -4.077508e-02 9.035919e-03 -4.228097e-02 -2.609213e-02 4.964468e-02 -4.945422e-02 4.401606e-02 3.779621e-02 -7.064831e-03
[551] 6.028778e-03 -1.285767e-02 1.871008e-02 -2.178221e-02 8.774721e-03 -1.494983e-03 2.223267e-02 2.140153e-02 -1.133906e-02 1.406622e-02 5.937716e-03
[562] -1.154679e-02 -5.374149e-03 1.583535e-02 -1.657431e-03 -2.190166e-02 4.580735e-03 3.902560e-03 -5.712559e-03 1.905239e-02 1.250474e-02 3.142785e-03
[573] -4.229077e-02 1.112972e-02 1.159426e-02 -6.124648e-03 1.074682e-02 1.562639e-02 -1.419702e-02 -2.305427e-03 -1.420916e-02 -9.603551e-04 6.147625e-03
[584] 1.915911e-02 8.792105e-04 -4.532145e-03 -5.680721e-02 1.358049e-03 1.905945e-02 -3.173824e-03 -6.867183e-03 -7.037427e-03 3.342335e-02 1.143312e-02
[595] 1.404019e-02 2.065715e-03 1.684347e-02 6.514329e-04 1.165027e-02 9.576327e-05 -2.260573e-02 -6.934694e-03 -2.142185e-02 2.396725e-02 6.019690e-03
[606] -2.782774e-04 7.682708e-03 -4.998431e-03 1.642140e-02 -4.667161e-03 -8.994449e-03 -9.787728e-03 5.562572e-03 2.852900e-02 1.025394e-02 3.776123e-02
[617] -1.350213e-02 6.287467e-03 3.489175e-03 -1.819543e-02 2.131021e-03 -1.108748e-02 5.395327e-04 -1.985839e-02 5.128294e-03 -8.487946e-04 2.318634e-02
[628] -2.239890e-02 8.544886e-03 -2.192713e-02 -3.745335e-03 7.260441e-03 4.840571e-03 -6.563867e-03 -4.279772e-03 -5.199941e-03 2.017080e-02 6.624955e-03
[639] -6.479100e-03 -1.573757e-02 -5.910438e-03 2.123047e-02 1.449059e-02 -1.342294e-04 -1.496030e-03 6.898969e-03 1.185076e-03 -7.062652e-03 -1.511557e-02
[650] 1.331737e-02 1.767481e-02 -2.166483e-03 6.131944e-04 -7.902595e-03 5.952981e-03 -9.289693e-03 7.044446e-04 -2.179956e-03 -4.093422e-03 -1.216605e-02
[661] -3.898613e-03 1.804473e-03 -5.936508e-03 -5.976045e-03 8.169608e-03 5.968974e-03 4.140931e-03 1.064542e-04 -1.528967e-02 5.090206e-03 -2.045962e-02
[672] -9.416628e-03 1.476086e-03 -1.794400e-02 -2.855800e-03 1.069768e-02 -8.183489e-03 8.248550e-03 1.346920e-02 9.311152e-03 1.126958e-02 -1.649596e-03
[683] -2.677716e-03 2.215330e-02 1.100787e-03 -2.043733e-02 9.798385e-03 6.749699e-03 1.505639e-03 7.891363e-03 1.674935e-03 5.732184e-03 -4.900009e-03
[694] -2.772745e-03 -4.563191e-03 -1.928716e-02 1.491459e-02 1.981734e-02 -1.756353e-03 3.241591e-02 1.058073e-03 1.211744e-02 1.130170e-02 -2.441826e-03
[705] -1.803879e-03 -8.385979e-05 8.952716e-03 1.660717e-03 5.273925e-03 -6.687107e-03 3.976295e-03 1.704202e-03 4.238399e-03 3.457219e-03 5.992110e-03
[716] 3.195878e-03 -2.038848e-02 8.944889e-03 -9.272798e-04 7.751730e-03 4.405607e-03 -1.194338e-02 -7.266113e-03 7.904295e-03 -3.092098e-03 3.995858e-03
[727] -4.004508e-03 -6.534630e-03 1.000224e-02 8.603182e-03 -6.366912e-03 -6.874266e-03 -6.755564e-03 8.928509e-03 2.043177e-03 -2.334986e-03 9.995578e-03
[738] 2.193937e-02 3.484997e-03 9.230706e-03 6.818567e-03 1.928516e-03 -4.810895e-03 1.229170e-02 1.470263e-03 1.351335e-02 -1.061600e-03 9.605038e-03
[749] 3.093141e-03 1.045495e-02 2.704392e-02 1.113866e-02 -7.644189e-04 -1.577085e-02 2.425755e-02 -2.539163e-02 -2.799422e-03 -2.542457e-02 -9.003103e-03
[760] 2.170316e-02 1.263535e-02 2.401755e-03 -6.245406e-03 6.393832e-03 1.445475e-03 5.725709e-03 1.929917e-02 4.873880e-03 1.920972e-02 1.133680e-02
[771] -1.548330e-02 2.010048e-03 -1.026403e-02 1.065890e-02 -2.991039e-02 1.230039e-02 -3.665871e-02 1.656270e-02 -1.179058e-02 2.700227e-02 -2.138086e-02
[782] -4.353705e-03 -1.894895e-02 8.504494e-03 5.051029e-03 1.679806e-02 -2.183018e-02 3.661485e-03 7.098002e-03 6.162105e-04 1.311231e-02 -1.381116e-02
[793] -3.254421e-03 -1.312728e-02 -2.014077e-02 -2.692582e-04 1.593029e-02 4.607624e-04 8.800154e-03 -6.598445e-03 1.994941e-02 -8.767741e-03 1.195010e-02
[804] -1.032401e-02 -8.197185e-03 1.938905e-03 1.445746e-02 -3.338398e-03 6.508381e-03 5.093405e-03 1.410500e-03 -1.739768e-02 5.045362e-03 1.157892e-02
[815] -3.944977e-03 4.677399e-06 4.869636e-03 8.340694e-03 -1.954036e-02 -1.247602e-02 7.408824e-03 -4.490221e-03 8.088357e-03 -5.419108e-04 -1.293431e-04
[826] -2.016261e-02 8.119159e-03 -1.792112e-02 1.147722e-02 6.318429e-03 1.447264e-02 -4.637226e-03 6.811704e-04 -1.229291e-03 1.779128e-02 9.181434e-03
[837] -1.417596e-03 7.797399e-04 1.334761e-03 1.118297e-02 -5.403941e-03 -1.098778e-02 -1.261324e-03 -4.139352e-03 1.898148e-04 -9.525305e-04 2.642564e-04
[848] 3.980989e-03 -6.689473e-03 -6.672774e-03 4.667012e-03 8.856439e-03 -1.050669e-02 -5.916701e-03 1.815605e-02 2.661325e-03 1.434562e-02 -2.856325e-04
[859] -9.017965e-03 -5.352239e-03 -1.772071e-02 -5.518777e-03 -2.118438e-03 -3.611457e-03 -2.890997e-02 7.419217e-03 6.617934e-03 1.655157e-02 -5.917269e-03
[870] 7.881130e-03 6.950908e-04 -1.816262e-02 -8.026627e-03 -8.779353e-04 1.856718e-02 -1.420643e-02 -4.183054e-02 -4.274447e-02 1.572133e-02 3.289238e-02
[881] -1.316002e-02 1.092311e-02 -1.168494e-03 9.202256e-03 -8.036102e-03 -5.707915e-04 4.359452e-03 1.257960e-02 2.442616e-03 -4.958617e-03 -4.375736e-03
[892] -7.600207e-03 -1.638264e-02 5.088943e-03 -2.112402e-02 -1.820840e-02 1.079806e-02 2.472167e-02 -9.265221e-04 -1.049411e-02 8.783512e-05 5.562756e-03
[903] 1.359838e-02 6.147269e-03 2.779314e-03 -6.854027e-03 1.044524e-02 7.630481e-03 -8.468976e-04 -2.285633e-02 1.926633e-02 -1.468059e-02 -1.174899e-02
[914] -1.816780e-02 -1.430789e-02 1.059515e-02 -3.313027e-02 5.460833e-03 1.227365e-02 -1.269785e-02 1.081461e-03 1.236845e-02 7.030090e-03 -3.173951e-03
[925] -2.179294e-02 3.210710e-03 -5.332693e-03 3.061142e-02 5.890116e-03 1.982165e-02 -1.402257e-02 1.504384e-02 3.500292e-03 1.514044e-02 1.383049e-02
[936] -4.149174e-03 4.590790e-03 5.899000e-04 -3.199644e-03 -1.545824e-02 -2.458078e-03 -6.614124e-03 -8.428322e-03 -1.780235e-03 -2.594627e-03 8.372475e-03
[947] -1.376559e-02 -3.906343e-03 2.386037e-03 7.743188e-03 1.041985e-02 3.557522e-03 2.876629e-03 1.303050e-02 -2.085581e-03 -1.256839e-02 -1.031618e-02
[958] -3.550403e-03 -1.169179e-02 1.769761e-03 2.606547e-03 -2.662991e-02 -9.130319e-03 -1.553632e-02 8.187850e-03 5.874859e-03 -5.406026e-04 -1.731980e-02
[969] 2.719704e-02 9.453309e-04 1.108835e-02 -1.034674e-02 -1.321237e-03 -1.299598e-02 -8.751293e-03 2.729259e-03 -1.172800e-02 -1.910070e-02 1.030249e-02
[980] 6.081295e-03 4.339382e-03 1.692485e-03 2.837552e-03 -7.974245e-03 1.497396e-03 1.267879e-02 -4.872626e-03 1.042858e-03 -1.616902e-02 7.598287e-03
[991] 1.845644e-02 1.111281e-02 7.975279e-05 2.794498e-02 1.525125e-03 -1.508413e-03 -6.407204e-03 -3.960674e-03 1.019531e-03 3.399596e-02
[ reached getOption("max.print") -- omitted 475 entries ]
#Checking of significance of ARMA
coeftest(model2)
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
intercept -0.00039473 0.00037631 -1.049 0.2942
#point forecast is called out of sample forecast
autoplot(forecast(model2, h=500))
Explanation:
Auto ARIMA: gave order of ARIMA (0,0,0)
no autoregressive (AR) terms, no differencing (D) terms, and no moving average (MA) terms.
sigma^2: 0.0001351. This is the estimated variance of the residuals, representing the model’s ability to fit the data.
Log likelihood: 4662.94. A higher log likelihood indicates a better fit.
AIC: -9321.89. A lower AIC indicates a better model.
Implication: The ARIMA(0,0,0) model suggests that the LRN100 time series is a white noise process. This indicates that there are no predictable patterns or trends in the data.
The significance test The significance test suggests that the intercept coefficient in the ARIMA(0,0,0) model is not statistically significant. This supports the conclusion that the LRN100 series is a white noise process with a mean close to zero.
Linearity Test:
Used Test: BDS Test
H0: There is linearity in log returns of series
H1: There is no linearity in log returns of series
bds_result_BSESN <- bds.test(LRBSESN)
# Print the result
print(bds_result_BSESN)
BDS Test
data: LRBSESN
Embedding dimension = 2 3
Epsilon for close points = 0.0059 0.0117 0.0176 0.0234
Standard Normal =
[ 0.0059 ] [ 0.0117 ] [ 0.0176 ] [ 0.0234 ]
[ 2 ] 10.290 10.0096 11.8203 13.5999
[ 3 ] 13.116 12.4284 13.8365 15.6771
p-value =
[ 0.0059 ] [ 0.0117 ] [ 0.0176 ] [ 0.0234 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
#BSESN data is non linear
bds_result_GSPC <- bds.test(LRGSPC)
# Print the result
print(bds_result_GSPC)
BDS Test
data: LRGSPC
Embedding dimension = 2 3
Epsilon for close points = 0.0065 0.0131 0.0196 0.0261
Standard Normal =
[ 0.0065 ] [ 0.0131 ] [ 0.0196 ] [ 0.0261 ]
[ 2 ] 10.2639 10.3889 11.3072 12.6351
[ 3 ] 16.1656 14.8205 14.7769 15.6305
p-value =
[ 0.0065 ] [ 0.0131 ] [ 0.0196 ] [ 0.0261 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
#GSPC data is non linear
bds_result_N225 <- bds.test(LRN225)
# Print the result
print(bds_result_N225)
BDS Test
data: LRN225
Embedding dimension = 2 3
Epsilon for close points = 0.0061 0.0122 0.0183 0.0244
Standard Normal =
[ 0.0061 ] [ 0.0122 ] [ 0.0183 ] [ 0.0244 ]
[ 2 ] 5.7808 5.7682 5.7902 6.9286
[ 3 ] 8.3245 8.2855 8.2031 8.7682
p-value =
[ 0.0061 ] [ 0.0122 ] [ 0.0183 ] [ 0.0244 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
#N225 data is non linear
bds_result_HSI <- bds.test(LRHSI)
# Print the result
print(bds_result_HSI)
BDS Test
data: LRHSI
Embedding dimension = 2 3
Epsilon for close points = 0.0072 0.0144 0.0216 0.0288
Standard Normal =
[ 0.0072 ] [ 0.0144 ] [ 0.0216 ] [ 0.0288 ]
[ 2 ] 0.4446 1.2127 2.7394 4.7064
[ 3 ] 1.3701 2.2145 3.7766 5.9738
p-value =
[ 0.0072 ] [ 0.0144 ] [ 0.0216 ] [ 0.0288 ]
[ 2 ] 0.6566 0.2252 0.0062 0
[ 3 ] 0.1707 0.0268 0.0002 0
#HSI data is non linear
bds_result_N100 <- bds.test(LRN100)
# Print the result
print(bds_result_N100)
BDS Test
data: LRN100
Embedding dimension = 2 3
Epsilon for close points = 0.0058 0.0116 0.0174 0.0233
Standard Normal =
[ 0.0058 ] [ 0.0116 ] [ 0.0174 ] [ 0.0233 ]
[ 2 ] 9.4712 9.1370 9.0274 8.9367
[ 3 ] 13.4175 12.0955 11.1530 10.8504
p-value =
[ 0.0058 ] [ 0.0116 ] [ 0.0174 ] [ 0.0233 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
#N100 data is non linear
Explanation:
p-value for all 5 series is less than 0.05
hence we reject the null hypothesis and say that there is no linearity in log returns of any series
Implication: Since series is not linear, a SETAR model might be a more appropriate choice for modeling the log return series. The SETAR model can capture the non-linear relationships and threshold effects present in the data.
BSESN:
VARselect(LRBSESN)
$selection
AIC(n) HQ(n) SC(n) FPE(n)
10 7 7 10
$criteria
1 2 3 4 5 6 7 8 9 10
AIC(n) -8.8883459138 -8.887293323 -8.8859605318 -8.8851478225 -8.8999061241 -8.9137036050 -8.9179104639 -8.9168047171 -8.9163464069 -8.9187745869
HQ(n) -8.8856525346 -8.883253254 -8.8805737735 -8.8784143746 -8.8918259866 -8.9042767779 -8.9071369472 -8.9046845109 -8.9028795111 -8.9039610015
SC(n) -8.8811246025 -8.876461356 -8.8715179092 -8.8670945443 -8.8782421903 -8.8884290155 -8.8890252187 -8.8843088163 -8.8802398504 -8.8790573748
FPE(n) 0.0001379877 0.000138133 0.0001383173 0.0001384297 0.0001364017 0.0001345327 0.0001339679 0.0001341161 0.0001341776 0.0001338522
#AIC lag is 10
selectSETAR(LRBSESN, m=2, thDelay = 1)
Using maximum autoregressive order for low regime: mL = 2
Using maximum autoregressive order for high regime: mH = 2
Searching on 1031 possible threshold values within regimes with sufficient ( 15% ) number of observations
Searching on 4124 combinations of thresholds ( 1031 ), thDelay ( 1 ), mL ( 2 ) and MM ( 2 )
Results of the grid search for 1 threshold
mod.setar1 = setar(LRBSESN, m=2, thDelay = 1, th= -0.007846886)
summary(mod.setar1)
Non linear autoregressive model
SETAR model ( 2 regimes)
Coefficients:
Low regime:
const.L phiL.1 phiL.2
-0.0006002744 -0.1619868545 -0.0369244206
High regime:
const.H phiH.1 phiH.2
0.0005889211 -0.0012648234 0.0148180386
Threshold:
-Variable: Z(t) = + (0) X(t)+ (1)X(t-1)
-Value: -0.007847 (fixed)
Proportion of points in low regime: 15.61% High regime: 84.39%
Residuals:
Min 1Q Median 3Q Max
-0.13210561 -0.00522834 0.00039675 0.00587742 0.08109691
Fit:
residuals variance = 0.000136, AIC = -13120, MAPE = 117.3%
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
const.L -0.00060027 0.00121338 -0.4947 0.620876
phiL.1 -0.16198685 0.05178108 -3.1283 0.001793 **
phiL.2 -0.03692442 0.05778069 -0.6390 0.522894
const.H 0.00058892 0.00036295 1.6226 0.104891
phiH.1 -0.00126482 0.03018484 -0.0419 0.966582
phiH.2 0.01481804 0.04060796 0.3649 0.715235
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Threshold
Variable: Z(t) = + (0) X(t) + (1) X(t-1)
Value: -0.007847 (fixed)
Explanation:
AIC order: 10
Hence Threshold value: -0.007846886
Implication: The SETAR model provides a suitable framework for capturing the non-linear dynamics in the time series data. The results indicate significant differences in the dynamics between the high and low regimes, suggesting that the threshold is an important factor in understanding the series’ behavior.
GSPC:
VARselect(LRGSPC)
$selection
AIC(n) HQ(n) SC(n) FPE(n)
9 9 9 9
$criteria
1 2 3 4 5 6 7 8 9 10
AIC(n) -8.6948779057 -8.7006300470 -8.6996339786 -8.7033708540 -8.7040914022 -8.7155444784 -8.7338966229 -8.7427322452 -8.7593777134 -8.7592208139
HQ(n) -8.6922357127 -8.6966667576 -8.6943495926 -8.6967653716 -8.6961648233 -8.7062968030 -8.7233278510 -8.7308423769 -8.7461667485 -8.7446887526
SC(n) -8.6877859348 -8.6899920907 -8.6854500369 -8.6856409269 -8.6828154897 -8.6907225804 -8.7055287395 -8.7108183764 -8.7239178591 -8.7202149742
FPE(n) 0.0001674413 0.0001664809 0.0001666468 0.0001660252 0.0001659056 0.0001640164 0.0001610338 0.0001596172 0.0001569823 0.0001570069
#AIC lag is 9
selectSETAR(LRGSPC, m=2, thDelay = 1)
Using maximum autoregressive order for low regime: mL = 2
Using maximum autoregressive order for high regime: mH = 2
Searching on 1054 possible threshold values within regimes with sufficient ( 15% ) number of observations
Searching on 4216 combinations of thresholds ( 1054 ), thDelay ( 1 ), mL ( 2 ) and MM ( 2 )
Results of the grid search for 1 threshold
mod.setar2 = setar(LRGSPC, m=2, thDelay = 1, th= -0.007264115)
summary(mod.setar2)
Non linear autoregressive model
SETAR model ( 2 regimes)
Coefficients:
Low regime:
const.L phiL.1 phiL.2
0.006076111 -0.283161982 0.295352834
High regime:
const.H phiH.1 phiH.2
-0.0001563904 -0.0431681899 0.1046109439
Threshold:
-Variable: Z(t) = + (0) X(t)+ (1)X(t-1)
-Value: -0.007264 (fixed)
Proportion of points in low regime: 18.53% High regime: 81.47%
Residuals:
Min 1Q Median 3Q Max
-0.10699514 -0.00570294 0.00050195 0.00650953 0.08828058
Fit:
residuals variance = 0.0001597, AIC = -13171, MAPE = 138.9%
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
const.L 0.00607611 0.00129062 4.7079 2.734e-06 ***
phiL.1 -0.28316198 0.04096171 -6.9128 7.000e-12 ***
phiL.2 0.29535283 0.05995260 4.9264 9.300e-07 ***
const.H -0.00015639 0.00040545 -0.3857 0.69976
phiH.1 -0.04316819 0.03267940 -1.3210 0.18672
phiH.2 0.10461094 0.04074319 2.5676 0.01034 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Threshold
Variable: Z(t) = + (0) X(t) + (1) X(t-1)
Value: -0.007264 (fixed)
Explanation:
AIC order: 9
Hence Threshold value: -0.007264115
Implication: The SETAR model provides a suitable framework for capturing the non-linear dynamics in the time series data. The results indicate significant differences in the dynamics between the high and low regimes, suggesting that the threshold is an important factor in understanding the series’ behavior.
N225:
VARselect(LRN225)
$selection
AIC(n) HQ(n) SC(n) FPE(n)
7 2 1 7
$criteria
1 2 3 4 5 6 7 8 9 10
AIC(n) -8.8064220023 -8.8089861754 -8.8084980041 -8.8079878686 -8.8076022254 -8.807592237 -8.8095343233 -8.808234382 -8.8070165531 -8.8059014050
HQ(n) -8.8037094870 -8.8049174024 -8.8030729735 -8.8012065803 -8.7994646795 -8.798098433 -8.7986842621 -8.796028063 -8.7934539766 -8.7909825708
SC(n) -8.7991523731 -8.7980817315 -8.7939587456 -8.7898137954 -8.7857933376 -8.782148534 -8.7804558062 -8.775521051 -8.7706684067 -8.7659184440
FPE(n) 0.0001497682 0.0001493846 0.0001494576 0.0001495338 0.0001495915 0.000149593 0.0001493028 0.000149497 0.0001496792 0.0001498462
#AIC lag is 7
selectSETAR(LRN225, m=2, thDelay = 1)
Using maximum autoregressive order for low regime: mL = 2
Using maximum autoregressive order for high regime: mH = 2
Searching on 1021 possible threshold values within regimes with sufficient ( 15% ) number of observations
Searching on 4084 combinations of thresholds ( 1021 ), thDelay ( 1 ), mL ( 2 ) and MM ( 2 )
Results of the grid search for 1 threshold
mod.setar3 = setar(LRN225, m=2, thDelay = 1, th= -0.008663830)
summary(mod.setar3)
Non linear autoregressive model
SETAR model ( 2 regimes)
Coefficients:
Low regime:
const.L phiL.1 phiL.2
0.0009539415 0.0858228839 0.1293747986
High regime:
const.H phiH.1 phiH.2
0.0004778877 -0.0240467414 0.0231179134
Threshold:
-Variable: Z(t) = + (0) X(t)+ (1)X(t-1)
-Value: -0.008664 (fixed)
Proportion of points in low regime: 18.69% High regime: 81.31%
Residuals:
Min 1Q Median 3Q Max
-0.05684686 -0.00633326 0.00035811 0.00661996 0.07802954
Fit:
residuals variance = 0.0001473, AIC = -12896, MAPE = 121.6%
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
const.L 0.00095394 0.00165025 0.5781 0.56331
phiL.1 0.08582288 0.04878113 1.7593 0.07873 .
phiL.2 0.12937480 0.08534870 1.5158 0.12978
const.H 0.00047789 0.00039173 1.2200 0.22268
phiH.1 -0.02404674 0.03089351 -0.7784 0.43647
phiH.2 0.02311791 0.03976339 0.5814 0.56107
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Threshold
Variable: Z(t) = + (0) X(t) + (1) X(t-1)
Value: -0.008664 (fixed)
Explanation:
AIC order: 7
Hence Threshold value: -0.008663830
Implication: The SETAR model provides a suitable framework for capturing the non-linear dynamics in the time series data. The results indicate significant differences in the dynamics between the high and low regimes, suggesting that the threshold is an important factor in understanding the series’ behavior.
HSI:
VARselect(LRHSI)
$selection
AIC(n) HQ(n) SC(n) FPE(n)
6 1 1 6
$criteria
1 2 3 4 5 6 7 8 9 10
AIC(n) -8.4707563079 -8.4698769448 -8.4690724160 -8.4689447709 -8.4675810792 -8.4726825328 -8.4714138743 -8.4705520617 -8.470720092 -8.4694221308
HQ(n) -8.4680629288 -8.4658368760 -8.4636856577 -8.4622113230 -8.4595009418 -8.4632557058 -8.4606403576 -8.4584318555 -8.457253197 -8.4546085454
SC(n) -8.4635349966 -8.4590449778 -8.4546297934 -8.4508914927 -8.4459171454 -8.4474079433 -8.4425286291 -8.4380561609 -8.434613536 -8.4297049187
FPE(n) 0.0002095064 0.0002096907 0.0002098595 0.0002098863 0.0002101727 0.0002091032 0.0002093687 0.0002095492 0.000209514 0.0002097862
#AIC lag is 6
selectSETAR(LRHSI, m=2, thDelay = 1)
Using maximum autoregressive order for low regime: mL = 2
Using maximum autoregressive order for high regime: mH = 2
Searching on 1031 possible threshold values within regimes with sufficient ( 15% ) number of observations
Searching on 4124 combinations of thresholds ( 1031 ), thDelay ( 1 ), mL ( 2 ) and MM ( 2 )
Results of the grid search for 1 threshold
mod.setar4 = setar(LRHSI, m=2, thDelay = 1, th= -0.01201875)
summary(mod.setar4)
Non linear autoregressive model
SETAR model ( 2 regimes)
Coefficients:
Low regime:
const.L phiL.1 phiL.2
-0.01232914 0.03013418 -0.51845312
High regime:
const.H phiH.1 phiH.2
-6.151951e-05 -1.973568e-02 -2.228439e-02
Threshold:
-Variable: Z(t) = + (0) X(t)+ (1)X(t-1)
-Value: -0.01202 (fixed)
Proportion of points in low regime: 18.67% High regime: 81.33%
Residuals:
Min 1Q Median 3Q Max
-0.06052237 -0.00828857 0.00055994 0.00774677 0.08113004
Fit:
residuals variance = 0.0002036, AIC = -12525, MAPE = 122.8%
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
const.L -0.01232914 0.00224887 -5.4824 4.933e-08 ***
phiL.1 0.03013417 0.05287083 0.5700 0.5688
phiL.2 -0.51845312 0.10001403 -5.1838 2.477e-07 ***
const.H -0.00006152 0.00044406 -0.1385 0.8898
phiH.1 -0.01973568 0.02970265 -0.6644 0.5065
phiH.2 -0.02228439 0.03762699 -0.5922 0.5538
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Threshold
Variable: Z(t) = + (0) X(t) + (1) X(t-1)
Value: -0.01202 (fixed)
Explanation:
AIC order: 10
Hence Threshold value: -0.01201875
Implication: The SETAR model provides a suitable framework for capturing the non-linear dynamics in the time series data. The results indicate significant differences in the dynamics between the high and low regimes, suggesting that the threshold is an important factor in understanding the series’ behavior.
N100:
VARselect(LRN100)
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 8 1 8
$criteria
1 2 3 4 5 6 7 8 9 10
AIC(n) -8.9021481492 -8.9043488399 -8.903201533 -8.9023525834 -8.9026105334 -8.9126158023 -8.9197348485 -8.9211745124 -8.9199938873 -8.9187080865
HQ(n) -8.8995478063 -8.9004483257 -8.898000847 -8.8958517263 -8.8948095049 -8.9035146024 -8.9093334771 -8.9094729696 -8.9069921731 -8.9044062009
SC(n) -8.8951620348 -8.8938696685 -8.889229304 -8.8848872977 -8.8816521905 -8.8881644023 -8.8917903913 -8.8897369980 -8.8850633158 -8.8802844579
FPE(n) 0.0001360963 0.0001357971 0.000135953 0.0001360684 0.0001360333 0.0001346791 0.0001337237 0.0001335313 0.0001336891 0.0001338611
#AIC lag is 8
selectSETAR(LRN100, m=2, thDelay = 1)
Using maximum autoregressive order for low regime: mL = 2
Using maximum autoregressive order for high regime: mH = 2
Searching on 1072 possible threshold values within regimes with sufficient ( 15% ) number of observations
Searching on 4288 combinations of thresholds ( 1072 ), thDelay ( 1 ), mL ( 2 ) and MM ( 2 )
Results of the grid search for 1 threshold
mod.setar5 = setar(LRN100, m=2, thDelay = 1, th= -0.006764070)
summary(mod.setar5)
Non linear autoregressive model
SETAR model ( 2 regimes)
Coefficients:
Low regime:
const.L phiL.1 phiL.2
0.002177095 0.112955295 0.142519637
High regime:
const.H phiH.1 phiH.2
-2.901857e-05 -5.224197e-02 7.378584e-02
Threshold:
-Variable: Z(t) = + (0) X(t)+ (1)X(t-1)
-Value: -0.006764 (fixed)
Proportion of points in low regime: 19.23% High regime: 80.77%
Residuals:
Min 1Q Median 3Q Max
-0.12701096 -0.00470824 0.00063317 0.00590786 0.07355260
Fit:
residuals variance = 0.0001335, AIC = -13692, MAPE = 134.3%
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
const.L 2.1771e-03 1.1339e-03 1.9200 0.05505 .
phiL.1 1.1296e-01 4.6231e-02 2.4433 0.01467 *
phiL.2 1.4252e-01 5.7836e-02 2.4642 0.01384 *
const.H -2.9019e-05 3.7018e-04 -0.0784 0.93753
phiH.1 -5.2242e-02 3.0466e-02 -1.7147 0.08659 .
phiH.2 7.3786e-02 4.2470e-02 1.7374 0.08253 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Threshold
Variable: Z(t) = + (0) X(t) + (1) X(t-1)
Value: -0.006764 (fixed)
Explanation:
AIC order: 10
Hence Threshold value: -0.006764070
Implication: The SETAR model provides a suitable framework for capturing the non-linear dynamics in the time series data. The results indicate significant differences in the dynamics between the high and low regimes, suggesting that the threshold is an important factor in understanding the series’ behavior.
Random Walk and Market Efficiency Check for all 5 returns series:
Test 1: Automatic Variance Ratio Test
H0: follows random walk and has weak form of mkt efficiency i.e. mkt is not predictable
if critical value > 1.96, we reject the null hypothesis
Test 2: Automatic Portmanteau Test
H0: follows random walk and has weak form of mkt efficiency i.e. mkt is not predictable
if critical value > 1.96, we reject the null hypothesis
Test 3: Hurst Exponent Test
H= 0.5 or near : follows random walk
H= 0 or near: short memory
H= 1 or near: long memory
BSESN:
# RANDOM WALK MODEL
Auto.VR(LRBSESN)
$stat
[1] 28.85623
$sum
[1] 2.503848
Auto.Q(LRBSESN)
$Stat
[1] 0.4566666
$Pvalue
[1] 0.499186
hurstexp(LRBSESN)
Simple R/S Hurst estimation: 0.5548493
Corrected R over S Hurst exponent: 0.5783945
Empirical Hurst exponent: 0.5033265
Corrected empirical Hurst exponent: 0.4747791
Theoretical Hurst exponent: 0.5329845
Explanation:
Automatic Variance Ratio test suggests series does not follow random walk model
Automatic Portmanteau Test suggests series follows random walk model
Hurst Exponent suggests series follows random walk model
Automatic Variance Ratio test is more reliable hence we say the NSEI returns series does not follow random walk and stock has some degree of market inefficiency
GSPC:
Auto.VR(LRGSPC)
$stat
[1] 46.63477
$sum
[1] 4.061747
Auto.Q(LRGSPC)
$Stat
[1] 4.901365
$Pvalue
[1] 0.02683548
hurstexp(LRGSPC)
Simple R/S Hurst estimation: 0.5215629
Corrected R over S Hurst exponent: 0.5472432
Empirical Hurst exponent: 0.5406975
Corrected empirical Hurst exponent: 0.5025474
Theoretical Hurst exponent: 0.5369649
Explanation:
Automatic Variance Ratio test suggests series does not follow random walk model
Automatic Portmanteau Test suggests series does not follow random walk model
Hurst Exponent suggests series follows random walk model
Automatic Variance Ratio test is more reliable hence we say the GSPC returns series does not follow random walk and stock has some degree of market inefficiency
N225:
Auto.VR(LRN225)
$stat
[1] 9.521586
$sum
[1] 1.368356
Auto.Q(LRN225)
$Stat
[1] 0.02998929
$Pvalue
[1] 0.8625145
hurstexp(LRN225)
Simple R/S Hurst estimation: 0.5241724
Corrected R over S Hurst exponent: 0.5420117
Empirical Hurst exponent: 0.5083791
Corrected empirical Hurst exponent: 0.4733481
Theoretical Hurst exponent: 0.5371811
Explanation:
Automatic Variance Ratio test suggests series does not follow random walk model
Automatic Portmanteau Test suggests series does not follow random walk model
Hurst Exponent suggests series follows random walk model
Automatic Variance Ratio test is more reliable hence we say the GSPC returns series does not follow random walk and stock has some degree of market inefficiency
HSI:
Auto.VR(LRHSI)
$stat
[1] -0.0555631
$sum
[1] 0.9981716
Auto.Q(LRHSI)
$Stat
[1] 0.01284963
$Pvalue
[1] 0.9097482
hurstexp(LRHSI)
Simple R/S Hurst estimation: 0.5056465
Corrected R over S Hurst exponent: 0.5226207
Empirical Hurst exponent: 0.5192194
Corrected empirical Hurst exponent: 0.4855209
Theoretical Hurst exponent: 0.5329845
Explanation:
Automatic Variance Ratio test suggests series follows random walk model
Automatic Portmanteau Test suggests series follows random walk model
Hurst Exponent suggests series follows random walk model
From all three tests we can say the HSI returns series follows random walk and stock has weak form of market efficiency
N100:
Auto.VR(LRN100)
$stat
[1] -0.5221212
$sum
[1] 0.9832896
Auto.Q(LRN100)
$Stat
[1] 0.008651063
$Pvalue
[1] 0.9258948
hurstexp(LRN100)
Simple R/S Hurst estimation: 0.5260294
Corrected R over S Hurst exponent: 0.5526032
Empirical Hurst exponent: 0.558224
Corrected empirical Hurst exponent: 0.5210087
Theoretical Hurst exponent: 0.5354925
Explanation:
Automatic Variance Ratio test suggests series follows random walk model
Automatic Portmanteau Test suggests series follows random walk model
Hurst Exponent suggests series follows random walk model
From all the 3 tests we say the N100 returns series follows random walk and stock has weak form of market efficiency
ARCH & GARCH Test for all 5 series:
To include stylised facts of returns series into forecasting, we will move ahead to forecasting with ARCH & GARCH for all of our returns series
ARCH Test:
AutoRegressive Conditional Heteroskedasticity Test
H0: There is no ARCH effect in the returns series of data
H1: There is ARCH effect in the returns series of data
BSESN:
#step 2: ARCH effect test
ArchTest(LRBSESN) #p-value < 0.05, there is ARCH effect
ARCH LM-test; Null hypothesis: no ARCH effects
data: LRBSESN
Chi-squared = 463.03, df = 12, p-value < 2.2e-16
#there is ARCH effect
# step3: ARCH/GARCH order
garch(LRBSESN, grad="numerical",trace=FALSE)
Call:
garch(x = LRBSESN, grad = "numerical", trace = FALSE)
Coefficient(s):
a0 a1 b1
9.339e-05 5.000e-02 5.000e-02
#step 4: Application of ARCH and GARCH
x=ugarchspec(variance.model = list(garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
x_fit=ugarchfit(x,data=LRBSESN)
x_fit
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000877 0.000210 4.1743 0.00003
omega 0.000002 0.000001 1.5114 0.13068
alpha1 0.115395 0.019516 5.9130 0.00000
beta1 0.868095 0.019976 43.4574 0.00000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000877 0.000225 3.90409 0.000095
omega 0.000002 0.000005 0.40682 0.684136
alpha1 0.115395 0.056525 2.04149 0.041202
beta1 0.868095 0.062088 13.98179 0.000000
LogLikelihood : 4821.678
Information Criteria
------------------------------------
Akaike -6.5324
Bayes -6.5181
Shibata -6.5325
Hannan-Quinn -6.5271
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 7.278 0.006980
Lag[2*(p+q)+(p+q)-1][2] 7.490 0.008834
Lag[4*(p+q)+(p+q)-1][5] 9.124 0.015397
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.1916 0.6616
Lag[2*(p+q)+(p+q)-1][5] 0.4586 0.9639
Lag[4*(p+q)+(p+q)-1][9] 1.6331 0.9440
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.1965 0.500 2.000 0.6575
ARCH Lag[5] 0.3953 1.440 1.667 0.9140
ARCH Lag[7] 0.6795 2.315 1.543 0.9594
Nyblom stability test
------------------------------------
Joint Statistic: 28.2795
Individual Statistics:
mu 0.02716
omega 3.31493
alpha1 0.19591
beta1 0.15197
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.07 1.24 1.6
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 37.31 0.007252
2 30 51.54 0.006128
3 40 55.93 0.038626
4 50 66.19 0.051312
Elapsed time : 0.0618391
x=newsimpact(x_fit)
plot(x$zx, x$zy, type="l", lwd=2, col="blue", main="GARCH(1,1) - News Impact", ylab=x$yexpr, xlab=x$xexpr)
model1=ugarchspec(variance.model = list(model="eGARCH",garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
fitmodel1=ugarchfit(model1,data=LRBSESN)
fitmodel1
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : eGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000532 0.000160 3.3313 0.000864
omega -0.237171 0.005761 -41.1672 0.000000
alpha1 -0.102849 0.008139 -12.6370 0.000000
beta1 0.974429 0.000798 1221.8433 0.000000
gamma1 0.163178 0.011168 14.6106 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000532 0.000144 3.6956 0.000219
omega -0.237171 0.008609 -27.5496 0.000000
alpha1 -0.102849 0.016763 -6.1355 0.000000
beta1 0.974429 0.000799 1218.9470 0.000000
gamma1 0.163178 0.029997 5.4399 0.000000
LogLikelihood : 4846.039
Information Criteria
------------------------------------
Akaike -6.5641
Bayes -6.5462
Shibata -6.5641
Hannan-Quinn -6.5574
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 8.806 0.003002
Lag[2*(p+q)+(p+q)-1][2] 8.944 0.003636
Lag[4*(p+q)+(p+q)-1][5] 10.464 0.006993
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.3962 0.5291
Lag[2*(p+q)+(p+q)-1][5] 0.6467 0.9329
Lag[4*(p+q)+(p+q)-1][9] 1.9671 0.9089
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.06806 0.500 2.000 0.7942
ARCH Lag[5] 0.48080 1.440 1.667 0.8893
ARCH Lag[7] 0.58915 2.315 1.543 0.9696
Nyblom stability test
------------------------------------
Joint Statistic: 1.0483
Individual Statistics:
mu 0.1828
omega 0.2502
alpha1 0.3763
beta1 0.2403
gamma1 0.1541
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.28 1.47 1.88
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 36.91 0.008155
2 30 40.32 0.078913
3 40 52.13 0.077753
4 50 52.63 0.335517
Elapsed time : 0.06346011
Explanation:
e-GARCH test is done when there is asymmetry in volatility of returns and when there is leverage effect
here is gamma value > 0 i.e. positive hence there is no leverage effect in the data
hence we cannot forecast with e-GARCH model and hence we will forecast the volatility with GARCH model.
ugarchforecast(x_fit, n.ahead=20)
*------------------------------------*
* GARCH Model Forecast *
*------------------------------------*
Model: sGARCH
Horizon: 20
Roll Steps: 0
Out of Sample: 0
0-roll forecast [T0=2023-12-29]:
Series Sigma
T+1 0.0008769 0.007402
T+2 0.0008769 0.007489
T+3 0.0008769 0.007574
T+4 0.0008769 0.007656
T+5 0.0008769 0.007737
T+6 0.0008769 0.007815
T+7 0.0008769 0.007891
T+8 0.0008769 0.007965
T+9 0.0008769 0.008037
T+10 0.0008769 0.008107
T+11 0.0008769 0.008176
T+12 0.0008769 0.008243
T+13 0.0008769 0.008308
T+14 0.0008769 0.008372
T+15 0.0008769 0.008434
T+16 0.0008769 0.008495
T+17 0.0008769 0.008554
T+18 0.0008769 0.008612
T+19 0.0008769 0.008669
T+20 0.0008769 0.008724
GSPC:
#step 2: ARCH effect test
ArchTest(LRGSPC) #p-value < 0.05, there is ARCH effect
ARCH LM-test; Null hypothesis: no ARCH effects
data: LRGSPC
Chi-squared = 593.04, df = 12, p-value < 2.2e-16
#there is ARCH effect
# step3: ARCH/GARCH order
garch(LRGSPC, grad="numerical",trace=FALSE)
Call:
garch(x = LRGSPC, grad = "numerical", trace = FALSE)
Coefficient(s):
a0 a1 b1
0.0001141 0.0500000 0.0500000
#step 4: Application of ARCH and GARCH
x=ugarchspec(variance.model = list(garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
x_fit1=ugarchfit(x,data=LRGSPC)
x_fit1
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000913 0.000215 4.2498 0.000021
omega 0.000005 0.000004 1.3576 0.174600
alpha1 0.201158 0.027412 7.3384 0.000000
beta1 0.774701 0.032942 23.5168 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000913 0.000300 3.04710 0.002311
omega 0.000005 0.000024 0.20389 0.838438
alpha1 0.201158 0.088012 2.28557 0.022279
beta1 0.774701 0.166989 4.63924 0.000003
LogLikelihood : 4793.509
Information Criteria
------------------------------------
Akaike -6.3521
Bayes -6.3380
Shibata -6.3521
Hannan-Quinn -6.3469
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.03961 0.8422
Lag[2*(p+q)+(p+q)-1][2] 0.04905 0.9571
Lag[4*(p+q)+(p+q)-1][5] 0.36408 0.9765
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.04412 0.8336
Lag[2*(p+q)+(p+q)-1][5] 0.84524 0.8936
Lag[4*(p+q)+(p+q)-1][9] 2.00138 0.9048
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.02466 0.500 2.000 0.8752
ARCH Lag[5] 1.69851 1.440 1.667 0.5417
ARCH Lag[7] 2.22367 2.315 1.543 0.6700
Nyblom stability test
------------------------------------
Joint Statistic: 4.0087
Individual Statistics:
mu 0.06404
omega 0.33970
alpha1 0.06068
beta1 0.16191
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.07 1.24 1.6
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 57.07 1.116e-05
2 30 83.19 3.911e-07
3 40 80.70 9.850e-05
4 50 98.03 4.026e-05
Elapsed time : 0.05446005
Explanation:
ARCH test suggests that there is ARCH effect in the data hence we can move ahead to do GARCH forecasting of the series
GARCH gave ARCH,GARCH order of 1,1
Sign Bias Test suggest that there is no significant effect of positive and negative bias individually.
but there is collective effect of both the signs on returns of series. hence there is asymmetry in volatility of returns
x=newsimpact(x_fit1)
plot(x$zx, x$zy, type="l", lwd=2, col="blue", main="GARCH(1,1) - News Impact", ylab=x$yexpr, xlab=x$xexpr)
model2=ugarchspec(variance.model = list(model="eGARCH",garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
fitmodel2=ugarchfit(model2,data=LRGSPC)
fitmodel2
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : eGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000435 0.000219 1.9927 0.046296
omega -0.495791 0.078389 -6.3247 0.000000
alpha1 -0.150342 0.019505 -7.7078 0.000000
beta1 0.945264 0.008550 110.5608 0.000000
gamma1 0.282000 0.033251 8.4810 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000435 0.000217 2.0049 0.044974
omega -0.495791 0.107859 -4.5967 0.000004
alpha1 -0.150342 0.039768 -3.7805 0.000157
beta1 0.945264 0.012022 78.6286 0.000000
gamma1 0.282000 0.057996 4.8624 0.000001
LogLikelihood : 4812.87
Information Criteria
------------------------------------
Akaike -6.3765
Bayes -6.3589
Shibata -6.3765
Hannan-Quinn -6.3699
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.3082 0.5788
Lag[2*(p+q)+(p+q)-1][2] 0.3366 0.7757
Lag[4*(p+q)+(p+q)-1][5] 0.8318 0.8964
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 4.684e-05 0.9945
Lag[2*(p+q)+(p+q)-1][5] 1.294e+00 0.7902
Lag[4*(p+q)+(p+q)-1][9] 2.727e+00 0.8030
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.02523 0.500 2.000 0.8738
ARCH Lag[5] 2.67608 1.440 1.667 0.3403
ARCH Lag[7] 3.37236 2.315 1.543 0.4461
Nyblom stability test
------------------------------------
Joint Statistic: 1.4007
Individual Statistics:
mu 0.0446
omega 0.1498
alpha1 0.1765
beta1 0.1425
gamma1 0.4051
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.28 1.47 1.88
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 52.90 4.843e-05
2 30 66.16 9.961e-05
3 40 73.75 6.455e-04
4 50 86.76 7.141e-04
Elapsed time : 0.063097
Explanation:
e-GARCH test is done when there is asymmetry in volatility of returns and when there is leverage effect
here is gamma value > 0 i.e. positive hence there is no leverage effect in the data
hence we cannot forecast with e-GARCH model and hence we will forecast the volatility with GARCH model.
ugarchforecast(x_fit1, n.ahead=20)
*------------------------------------*
* GARCH Model Forecast *
*------------------------------------*
Model: sGARCH
Horizon: 20
Roll Steps: 0
Out of Sample: 0
0-roll forecast [T0=2023-12-29]:
Series Sigma
T+1 0.000913 0.006735
T+2 0.000913 0.007014
T+3 0.000913 0.007276
T+4 0.000913 0.007523
T+5 0.000913 0.007756
T+6 0.000913 0.007977
T+7 0.000913 0.008187
T+8 0.000913 0.008386
T+9 0.000913 0.008577
T+10 0.000913 0.008759
T+11 0.000913 0.008932
T+12 0.000913 0.009099
T+13 0.000913 0.009259
T+14 0.000913 0.009412
T+15 0.000913 0.009559
T+16 0.000913 0.009700
T+17 0.000913 0.009836
T+18 0.000913 0.009967
T+19 0.000913 0.010093
T+20 0.000913 0.010215
N225:
#step 2: ARCH effect test
ArchTest(LRN225) #p-value < 0.05, there is ARCH effect
ARCH LM-test; Null hypothesis: no ARCH effects
data: LRN225
Chi-squared = 265.76, df = 12, p-value < 2.2e-16
#there is ARCH effect
# step3: ARCH/GARCH order
garch(LRN225, grad="numerical",trace=FALSE)
Call:
garch(x = LRN225, grad = "numerical", trace = FALSE)
Coefficient(s):
a0 a1 b1
0.0001238 0.0500000 0.0500000
#step 4: Application of ARCH and GARCH
x=ugarchspec(variance.model = list(garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
x_fit2=ugarchfit(x,data=LRN225)
x_fit2
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000521 0.000278 1.8777 0.060427
omega 0.000014 0.000001 23.2136 0.000000
alpha1 0.131004 0.013754 9.5246 0.000000
beta1 0.773102 0.017847 43.3181 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000521 0.000259 2.0124 0.044176
omega 0.000014 0.000001 16.8053 0.000000
alpha1 0.131004 0.015503 8.4504 0.000000
beta1 0.773102 0.021694 35.6368 0.000000
LogLikelihood : 4473.935
Information Criteria
------------------------------------
Akaike -6.1106
Bayes -6.0962
Shibata -6.1107
Hannan-Quinn -6.1052
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.003439 0.9532
Lag[2*(p+q)+(p+q)-1][2] 1.477468 0.3662
Lag[4*(p+q)+(p+q)-1][5] 3.145312 0.3812
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.2593 0.6106
Lag[2*(p+q)+(p+q)-1][5] 2.2939 0.5508
Lag[4*(p+q)+(p+q)-1][9] 4.9180 0.4416
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.3689 0.500 2.000 0.5436
ARCH Lag[5] 2.8382 1.440 1.667 0.3141
ARCH Lag[7] 4.2026 2.315 1.543 0.3183
Nyblom stability test
------------------------------------
Joint Statistic: 56.6899
Individual Statistics:
mu 0.04467
omega 7.11029
alpha1 0.09084
beta1 0.10619
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.07 1.24 1.6
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 50.92 9.595e-05
2 30 59.25 7.652e-04
3 40 80.70 9.838e-05
4 50 82.35 2.007e-03
Elapsed time : 0.05044484
Explanation:
ARCH test suggests that there is ARCH effect in the data hence we can move ahead to do GARCH forecasting of the series
GARCH gave ARCH,GARCH order of 1,1
Sign Bias Test suggest that there is no significant effect of positive and negative bias individually.
but there is collective effect of both the signs on returns of series. hence there is asymmetry in volatility of returns
x=newsimpact(x_fit2)
plot(x$zx, x$zy, type="l", lwd=2, col="blue", main="GARCH(1,1) - News Impact", ylab=x$yexpr, xlab=x$xexpr)
model3=ugarchspec(variance.model = list(model="eGARCH",garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
fitmodel3=ugarchfit(model3,data=LRN225)
fitmodel3
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : eGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000158 0.000231 0.68401 0.49397
omega -0.561271 0.071939 -7.80200 0.00000
alpha1 -0.134601 0.014011 -9.60660 0.00000
beta1 0.936967 0.007979 117.43029 0.00000
gamma1 0.174151 0.022325 7.80064 0.00000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000158 0.000218 0.72381 0.469182
omega -0.561271 0.112044 -5.00938 0.000001
alpha1 -0.134601 0.023651 -5.69102 0.000000
beta1 0.936967 0.012641 74.12130 0.000000
gamma1 0.174151 0.020713 8.40771 0.000000
LogLikelihood : 4501.276
Information Criteria
------------------------------------
Akaike -6.1467
Bayes -6.1286
Shibata -6.1467
Hannan-Quinn -6.1399
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.1251 0.7236
Lag[2*(p+q)+(p+q)-1][2] 2.0599 0.2530
Lag[4*(p+q)+(p+q)-1][5] 3.9440 0.2611
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.9429 0.3315
Lag[2*(p+q)+(p+q)-1][5] 3.3893 0.3405
Lag[4*(p+q)+(p+q)-1][9] 6.0086 0.2972
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.1015 0.500 2.000 0.7500
ARCH Lag[5] 2.5692 1.440 1.667 0.3587
ARCH Lag[7] 4.1788 2.315 1.543 0.3215
Nyblom stability test
------------------------------------
Joint Statistic: 1.0639
Individual Statistics:
mu 0.1472
omega 0.1662
alpha1 0.4928
beta1 0.1686
gamma1 0.1584
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.28 1.47 1.88
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 34.95 0.014164
2 30 45.22 0.027990
3 40 62.17 0.010593
4 50 76.27 0.007574
Elapsed time : 0.08286595
Explanation:
e-GARCH test is done when there is asymmetry in volatility of returns and when there is leverage effect
here is gamma value > 0 i.e. positive hence there is no leverage effect in the data
hence we cannot forecast with e-GARCH model and hence we will forecast the volatility with GARCH model.
ugarchforecast(x_fit2, n.ahead=20)
*------------------------------------*
* GARCH Model Forecast *
*------------------------------------*
Model: sGARCH
Horizon: 20
Roll Steps: 0
Out of Sample: 0
0-roll forecast [T0=2023-12-29]:
Series Sigma
T+1 0.0005211 0.009611
T+2 0.0005211 0.009860
T+3 0.0005211 0.010080
T+4 0.0005211 0.010274
T+5 0.0005211 0.010447
T+6 0.0005211 0.010601
T+7 0.0005211 0.010738
T+8 0.0005211 0.010860
T+9 0.0005211 0.010970
T+10 0.0005211 0.011068
T+11 0.0005211 0.011156
T+12 0.0005211 0.011235
T+13 0.0005211 0.011306
T+14 0.0005211 0.011369
T+15 0.0005211 0.011427
T+16 0.0005211 0.011478
T+17 0.0005211 0.011525
T+18 0.0005211 0.011566
T+19 0.0005211 0.011604
T+20 0.0005211 0.011638
HSI:
#step 2: ARCH effect test
ArchTest(LRHSI) #p-value < 0.05, there is ARCH effect
ARCH LM-test; Null hypothesis: no ARCH effects
data: LRHSI
Chi-squared = 157.75, df = 12, p-value < 2.2e-16
#there is ARCH effect
# step3: ARCH/GARCH order
garch(LRHSI, grad="numerical",trace=FALSE)
Call:
garch(x = LRHSI, grad = "numerical", trace = FALSE)
Coefficient(s):
a0 a1 b1
0.0001772 0.0500000 0.0500000
#step 4: Application of ARCH and GARCH
x=ugarchspec(variance.model = list(garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
x_fit3=ugarchfit(x,data=LRHSI)
x_fit3
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu -0.000196 0.000334 -0.5869 0.557273
omega 0.000005 0.000001 4.0367 0.000054
alpha1 0.062641 0.006623 9.4586 0.000000
beta1 0.910551 0.009264 98.2937 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu -0.000196 0.000334 -0.58779 0.556676
omega 0.000005 0.000003 2.11236 0.034656
alpha1 0.062641 0.009853 6.35735 0.000000
beta1 0.910551 0.013349 68.21104 0.000000
LogLikelihood : 4243.524
Information Criteria
------------------------------------
Akaike -5.7485
Bayes -5.7341
Shibata -5.7485
Hannan-Quinn -5.7432
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.02601 0.8719
Lag[2*(p+q)+(p+q)-1][2] 0.07051 0.9408
Lag[4*(p+q)+(p+q)-1][5] 0.73939 0.9152
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.09483 0.7581
Lag[2*(p+q)+(p+q)-1][5] 0.79490 0.9041
Lag[4*(p+q)+(p+q)-1][9] 2.66702 0.8124
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.1784 0.500 2.000 0.6727
ARCH Lag[5] 0.2652 1.440 1.667 0.9494
ARCH Lag[7] 2.3953 2.315 1.543 0.6341
Nyblom stability test
------------------------------------
Joint Statistic: 4.4769
Individual Statistics:
mu 0.03458
omega 0.15818
alpha1 0.37731
beta1 0.30034
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.07 1.24 1.6
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 44.61 0.0007778
2 30 52.32 0.0050263
3 40 57.39 0.0289508
4 50 75.14 0.0095687
Elapsed time : 0.04693198
Explanation:
ARCH test suggests that there is ARCH effect in the data hence we can move ahead to do GARCH forecasting of the series
GARCH gave ARCH,GARCH order of 1,1
The lack of significant overall sign bias and individual sign biases suggests that the impact of positive and negative shocks on the variance is symmetric. This means that positive and negative shocks have similar effects on the volatility of the time series.
x=newsimpact(x_fit3)
plot(x$zx, x$zy, type="l", lwd=2, col="blue", main="GARCH(1,1) - News Impact", ylab=x$yexpr, xlab=x$xexpr)
model4=ugarchspec(variance.model = list(model="eGARCH",garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
fitmodel4=ugarchfit(model3,data=LRHSI)
fitmodel4
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : eGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu -0.000512 0.000307 -1.6659 0.095743
omega -0.253424 0.003643 -69.5739 0.000000
alpha1 -0.077708 0.010569 -7.3526 0.000000
beta1 0.970123 0.000655 1481.4063 0.000000
gamma1 0.109938 0.007070 15.5491 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu -0.000512 0.000286 -1.7881 0.073752
omega -0.253424 0.008900 -28.4751 0.000000
alpha1 -0.077708 0.016703 -4.6523 0.000003
beta1 0.970123 0.000889 1090.9301 0.000000
gamma1 0.109938 0.016011 6.8662 0.000000
LogLikelihood : 4257.981
Information Criteria
------------------------------------
Akaike -5.7668
Bayes -5.7488
Shibata -5.7668
Hannan-Quinn -5.7601
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.03958 0.8423
Lag[2*(p+q)+(p+q)-1][2] 0.11438 0.9097
Lag[4*(p+q)+(p+q)-1][5] 0.76697 0.9097
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.7742 0.3789
Lag[2*(p+q)+(p+q)-1][5] 1.9970 0.6191
Lag[4*(p+q)+(p+q)-1][9] 3.4799 0.6778
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 0.5112 0.500 2.000 0.4746
ARCH Lag[5] 0.6486 1.440 1.667 0.8391
ARCH Lag[7] 1.9804 2.315 1.543 0.7215
Nyblom stability test
------------------------------------
Joint Statistic: 0.8802
Individual Statistics:
mu 0.06105
omega 0.27372
alpha1 0.10943
beta1 0.25554
gamma1 0.06889
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.28 1.47 1.88
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 39.59 0.003703
2 30 44.55 0.032553
3 40 51.43 0.087835
4 50 68.02 0.037338
Elapsed time : 0.06761289
Explanation:
e-GARCH test is done when there is asymmetry in volatility of returns and when there is leverage effect
here is gamma value > 0 i.e. positive hence there is no leverage effect in the data
hence we cannot forecast with e-GARCH model and hence we will forecast the volatility with GARCH model.
ugarchforecast(x_fit3, n.ahead=20)
*------------------------------------*
* GARCH Model Forecast *
*------------------------------------*
Model: sGARCH
Horizon: 20
Roll Steps: 0
Out of Sample: 0
0-roll forecast [T0=2023-12-29]:
Series Sigma
T+1 -0.0001961 0.01394
T+2 -0.0001961 0.01395
T+3 -0.0001961 0.01396
T+4 -0.0001961 0.01397
T+5 -0.0001961 0.01398
T+6 -0.0001961 0.01399
T+7 -0.0001961 0.01400
T+8 -0.0001961 0.01401
T+9 -0.0001961 0.01402
T+10 -0.0001961 0.01402
T+11 -0.0001961 0.01403
T+12 -0.0001961 0.01404
T+13 -0.0001961 0.01405
T+14 -0.0001961 0.01405
T+15 -0.0001961 0.01406
T+16 -0.0001961 0.01407
T+17 -0.0001961 0.01407
T+18 -0.0001961 0.01408
T+19 -0.0001961 0.01409
T+20 -0.0001961 0.01409
HSI:
#step 2: ARCH effect test
ArchTest(LRN100) #p-value < 0.05, there is ARCH effect
ARCH LM-test; Null hypothesis: no ARCH effects
data: LRN100
Chi-squared = 372.17, df = 12, p-value < 2.2e-16
#there is ARCH effect
# step3: ARCH/GARCH order
garch(LRN100, grad="numerical",trace=FALSE)
Call:
garch(x = LRN100, grad = "numerical", trace = FALSE)
Coefficient(s):
a0 a1 b1
0.0001117 0.0500000 0.0500000
#step 4: Application of ARCH and GARCH
x=ugarchspec(variance.model = list(garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
x_fit4=ugarchfit(x,data=LRN100)
x_fit4
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000679 0.000217 3.1290 0.001754
omega 0.000008 0.000001 9.7011 0.000000
alpha1 0.209428 0.024275 8.6274 0.000000
beta1 0.737770 0.020734 35.5828 0.000000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000679 0.000230 2.9476 0.003203
omega 0.000008 0.000001 6.4120 0.000000
alpha1 0.209428 0.027947 7.4938 0.000000
beta1 0.737770 0.033257 22.1841 0.000000
LogLikelihood : 4943.166
Information Criteria
------------------------------------
Akaike -6.4312
Bayes -6.4173
Shibata -6.4312
Hannan-Quinn -6.4260
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.9015 0.3424
Lag[2*(p+q)+(p+q)-1][2] 0.9038 0.5305
Lag[4*(p+q)+(p+q)-1][5] 1.2244 0.8072
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 0.5102 0.4750
Lag[2*(p+q)+(p+q)-1][5] 3.7320 0.2894
Lag[4*(p+q)+(p+q)-1][9] 5.3838 0.3753
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 2.633 0.500 2.000 0.1047
ARCH Lag[5] 3.843 1.440 1.667 0.1887
ARCH Lag[7] 4.432 2.315 1.543 0.2886
Nyblom stability test
------------------------------------
Joint Statistic: 12.2069
Individual Statistics:
mu 0.02216
omega 3.51522
alpha1 0.16553
beta1 0.27751
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.07 1.24 1.6
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 96.47 2.318e-12
2 30 117.01 1.573e-12
3 40 123.69 9.729e-11
4 50 155.02 6.189e-13
Elapsed time : 0.04173994
x=newsimpact(x_fit4)
plot(x$zx, x$zy, type="l", lwd=2, col="blue", main="GARCH(1,1) - News Impact", ylab=x$yexpr, xlab=x$xexpr)
model5=ugarchspec(variance.model = list(model="eGARCH",garchOrder=c(1,1)),mean.model = list(armaOrder=c(0,0)))
fitmodel5=ugarchfit(model5,data=LRN100)
fitmodel5
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : eGARCH(1,1)
Mean Model : ARFIMA(0,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.000064 0.000206 0.31051 0.75617
omega -0.490254 0.010383 -47.21652 0.00000
alpha1 -0.187089 0.012848 -14.56191 0.00000
beta1 0.946416 0.001416 668.57653 0.00000
gamma1 0.188822 0.009766 19.33541 0.00000
Robust Standard Errors:
Estimate Std. Error t value Pr(>|t|)
mu 0.000064 0.000190 0.33759 0.73567
omega -0.490254 0.027546 -17.79752 0.00000
alpha1 -0.187089 0.020168 -9.27642 0.00000
beta1 0.946416 0.002736 345.90298 0.00000
gamma1 0.188822 0.029692 6.35926 0.00000
LogLikelihood : 4981.4
Information Criteria
------------------------------------
Akaike -6.4797
Bayes -6.4623
Shibata -6.4797
Hannan-Quinn -6.4732
Weighted Ljung-Box Test on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 0.8021 0.3705
Lag[2*(p+q)+(p+q)-1][2] 0.8060 0.5657
Lag[4*(p+q)+(p+q)-1][5] 1.0173 0.8558
d.o.f=0
H0 : No serial correlation
Weighted Ljung-Box Test on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 1.689 0.1938
Lag[2*(p+q)+(p+q)-1][5] 3.781 0.2827
Lag[4*(p+q)+(p+q)-1][9] 5.380 0.3758
d.o.f=2
Weighted ARCH LM Tests
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 2.327 0.500 2.000 0.1272
ARCH Lag[5] 3.943 1.440 1.667 0.1791
ARCH Lag[7] 4.559 2.315 1.543 0.2731
Nyblom stability test
------------------------------------
Joint Statistic: 1.0781
Individual Statistics:
mu 0.27220
omega 0.32521
alpha1 0.05221
beta1 0.30107
gamma1 0.36109
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.28 1.47 1.88
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 74.44 1.654e-08
2 30 87.28 9.485e-08
3 40 104.10 7.754e-08
4 50 120.51 5.872e-08
Elapsed time : 0.06582999
Explanation:
e-GARCH test is done when there is asymmetry in volatility of returns and when there is leverage effect
here is gamma value > 0 i.e. positive hence there is no leverage effect in the data
hence we cannot forecast with e-GARCH model and hence we will forecast the volatility with GARCH model.
ugarchforecast(x_fit4, n.ahead=20)
*------------------------------------*
* GARCH Model Forecast *
*------------------------------------*
Model: sGARCH
Horizon: 20
Roll Steps: 0
Out of Sample: 0
0-roll forecast [T0=2023-12-29]:
Series Sigma
T+1 0.0006786 0.005967
T+2 0.0006786 0.006434
T+3 0.0006786 0.006847
T+4 0.0006786 0.007216
T+5 0.0006786 0.007550
T+6 0.0006786 0.007852
T+7 0.0006786 0.008129
T+8 0.0006786 0.008382
T+9 0.0006786 0.008615
T+10 0.0006786 0.008830
T+11 0.0006786 0.009029
T+12 0.0006786 0.009214
T+13 0.0006786 0.009385
T+14 0.0006786 0.009545
T+15 0.0006786 0.009694
T+16 0.0006786 0.009833
T+17 0.0006786 0.009962
T+18 0.0006786 0.010084
T+19 0.0006786 0.010197
T+20 0.0006786 0.010304